|
oveRTOS C API
Embedded RTOS framework — build system, configuration, and portable C API
|
Low-level serial I/O for the system console. More...
Functions | |
| int | ove_console_init (void) |
| Initialise the system console hardware. | |
| int | ove_console_getchar (void) |
| Read one character from the console. | |
| void | ove_console_putchar (int c) |
| Write one character to the console. | |
| void | ove_console_write (const char *buf, unsigned int len) |
| Write a raw byte buffer to the console. | |
Low-level serial I/O for the system console.
Provides a minimal character-oriented interface to the system console (typically a UART). This API is used internally by the logging and shell subsystems but may also be called directly by application code.
The console must be initialised with ove_console_init before any read or write operations are performed.
CONFIG_OVE_CONSOLE. | int ove_console_init | ( | void | ) |
Initialise the system console hardware.
Configures the underlying serial peripheral (baud rate, framing, etc.) as determined by the board support package. Must be called once before ove_console_getchar, ove_console_putchar, or ove_console_write are used.
CONFIG_OVE_CONSOLE. | int ove_console_getchar | ( | void | ) |
Read one character from the console.
Returns the next available character from the console receive buffer. The call may block until a character is available depending on the backend implementation.
CONFIG_OVE_CONSOLE. | void ove_console_putchar | ( | int | c | ) |
Write one character to the console.
Transmits the character c via the console output path. The call may block until the transmit buffer has space.
| [in] | c | Character to transmit, interpreted as an unsigned char. |
CONFIG_OVE_CONSOLE. | void ove_console_write | ( | const char * | buf, |
| unsigned int | len | ||
| ) |
Write a raw byte buffer to the console.
Transmits exactly len bytes from buf. No newline translation or null termination is applied. The call may block until all bytes have been accepted by the transmit buffer.
| [in] | buf | Pointer to the data to transmit. |
| [in] | len | Number of bytes to transmit. |
CONFIG_OVE_CONSOLE.