oveRTOS C++ API
C++20 RAII wrappers for the oveRTOS C API
Loading...
Searching...
No Matches
Functions
ove::console Namespace Reference

Thin C++ wrappers around the oveRTOS console (serial I/O) API. More...

Functions

int init ()
 Initialises the console subsystem.
 
int getchar ()
 Reads one character from the console, blocking until one is available.
 
void putchar (int c)
 Writes a single character to the console output.
 
void write (const char *data, unsigned int len)
 Writes a buffer of bytes to the console output.
 

Detailed Description

Thin C++ wrappers around the oveRTOS console (serial I/O) API.

Available when CONFIG_OVE_CONSOLE is enabled. All functions delegate directly to the corresponding ove_console_* C functions.

Function Documentation

◆ init()

int ove::console::init ( )
inline

Initialises the console subsystem.

Returns
OVE_OK on success, or a negative error code.

◆ getchar()

int ove::console::getchar ( )
inline

Reads one character from the console, blocking until one is available.

Returns
The character read as an unsigned char value cast to int, or -1 on error.

◆ putchar()

void ove::console::putchar ( int  c)
inline

Writes a single character to the console output.

Parameters
[in]cThe character to write.

◆ write()

void ove::console::write ( const char *  data,
unsigned int  len 
)
inline

Writes a buffer of bytes to the console output.

Parameters
[in]dataPointer to the data to write.
[in]lenNumber of bytes to write.