acrn-hypervisor/hypervisor/include/debug/console.h
Conghui Chen c61db6ffa0 HV: vuart: remove console related code from vuart
Move the console related code from dm/vuart.c to debug/console.c as
console is not supported in release version.

Tracked-On: #2987
Signed-off-by: Conghui Chen <conghui.chen@intel.com>
Acked-by: Eddie Dong <eddie.dong@intel.com>
2019-04-29 15:25:39 +08:00

44 lines
1016 B
C

/*
* Copyright (C) 2018 Intel Corporation. All rights reserved.
*
* SPDX-License-Identifier: BSD-3-Clause
*/
#ifndef CONSOLE_H
#define CONSOLE_H
#include <vuart.h>
/** Initializes the console module.
*
*/
void console_init(void);
/** Writes a given number of characters to the console.
*
* @param s A pointer to character array to write.
* @param len The number of characters to write.
*
* @return The number of characters written or -1 if an error occurred
* and no character was written.
*/
size_t console_write(const char *s, size_t len);
/** Writes a single character to the console.
*
* @param ch The character to write.
*
* @preturn The number of characters written or -1 if an error
* occurred before any character was written.
*/
void console_putc(const char *ch);
char console_getc(void);
void console_setup_timer(void);
void suspend_console(void);
void resume_console(void);
struct acrn_vuart *vm_console_vuart(struct acrn_vm *vm);
#endif /* CONSOLE_H */