6.1. console
— System console¶
The system console is the default communication channel to an application. The console input and output channels are often terminated by a shell to enable the user to control and debug the application.
Configure the console by changing the configuration
variables called CONFIG_START_CONSOLE*
.
Source code: src/oam/console.h, src/oam/console.c
Test coverage: src/oam/console.c
- Version
- 7.0.0
Functions
-
int
console_module_init
(void)¶ Initialize the console module. This function must be called before calling any other function in this module.
The module will only be initialized once even if this function is called multiple times.
- Return
- zero(0) or negative error code.
-
int
console_init
(void)¶ Initialize the console.
- Return
- zero(0) or negative error code.
-
int
console_start
(void)¶ Start the console.
- Return
- zero(0) or negative error code.
-
int
console_stop
(void)¶ Stop the console.
- Return
- zero(0) or negative error code.
-
int
console_set_input_channel
(chan_t *chan_p)¶ Set the pointer to the input channel.
- Return
- zero(0) or negative error code.
-
chan_t *
console_get_input_channel
(void)¶ Get the pointer to the input channel.
- Return
- Input channel or NULL.