10
10
/* Switching key combinations for shell and uart console */
11
11
#define GUEST_CONSOLE_TO_HV_SWITCH_KEY 0 /* CTRL + SPACE */
12
12
13
- #ifdef HV_DEBUG
14
- extern struct hv_timer console_timer ;
15
-
16
13
/** Initializes the console module.
17
14
*
18
15
*/
19
-
20
16
void console_init (void );
21
17
22
18
/** Writes a given number of characters to the console.
@@ -27,7 +23,6 @@ void console_init(void);
27
23
* @return The number of characters written or -1 if an error occurred
28
24
* and no character was written.
29
25
*/
30
-
31
26
size_t console_write (const char * s , size_t len );
32
27
33
28
/** Writes a single character to the console.
@@ -37,46 +32,16 @@ size_t console_write(const char *s, size_t len);
37
32
* @preturn The number of characters written or -1 if an error
38
33
* occurred before any character was written.
39
34
*/
40
-
41
35
void console_putc (const char * ch );
42
36
char console_getc (void );
43
37
44
38
void console_setup_timer (void );
45
-
46
- static inline void suspend_console (void )
47
- {
48
- del_timer (& console_timer );
49
- }
50
-
51
- static inline void resume_console (void )
52
- {
53
- console_setup_timer ();
54
- }
55
39
void uart16550_set_property (bool enabled , bool port_mapped , uint64_t base_addr );
56
40
57
41
void shell_init (void );
58
42
void shell_kick (void );
59
43
60
- #else
61
- static inline void console_init (void )
62
- {
63
- }
64
-
65
- static inline size_t console_write (__unused const char * str ,
66
- __unused size_t len )
67
- {
68
- return 0 ;
69
- }
70
- static inline void console_putc (__unused const char * ch ) { }
71
- static inline char console_getc (void ) { return '\0' ; }
72
- static inline void console_setup_timer (void ) {}
73
- static inline void suspend_console (void ) {}
74
- static inline void resume_console (void ) {}
75
- static inline void uart16550_set_property (__unused bool enabled ,
76
- __unused bool port_mapped , __unused uint64_t base_addr ) {}
77
-
78
- static inline void shell_init (void ) {}
79
- static inline void shell_kick (void ) {}
80
- #endif
44
+ void suspend_console (void );
45
+ void resume_console (void );
81
46
82
47
#endif /* CONSOLE_H */
0 commit comments