STDIO abstraction

Simple standard input/output (STDIO) abstraction for RIOT. More...

Detailed Description

Simple standard input/output (STDIO) abstraction for RIOT.

Modules

 STDIO for native
 Native CPU internal declarations.
 
 STDIO null driver
 Dummy implementation of the stdio interface.
 
 STDIO over CDC ACM (usbus)
 Standard input/output backend using usbus CDC ACM.
 
 STDIO over ESP32 Debug Serial/JTAG
 STDIO via the USB Serial/JTAG debug interface found on some ESP32 SoCs.
 
 STDIO over NimBLE
 To enable stdio over nimBLE, add the module stdio_nimble:
 
 STDIO over SEGGER RTT
 STDIO mapping for running the STDIO over SEGGER's RTT interface.
 
 STDIO over Semihosting
 Standard input/output backend using ARM Semihosting.
 
 STDIO over UART
 Standard input/output backend using UART.
 
 STDIO over UDP
 STDIO over UDP implementation.
 
 STDIO over USB CDC-ACM (tinyUSB)
 Standard input/output backend using tinyUSB CDC ACM.
 
 STDIO over telnet
 Standard input/output via telnet.
 
 STDIO via SLIP
 Standard input/output backend multiplexed via SLIP.
 
 STDIO via ethos
 Standard input/output backend multiplexed via ethernet-over-serial.
 

Files

file  stdio_base.h
 

Functions

void stdio_init (void)
 initialize the module
 
int stdio_available (void)
 Get the number of bytes available for reading from stdio. More...
 
ssize_t stdio_read (void *buffer, size_t max_len)
 read len bytes from stdio uart into buffer More...
 
ssize_t stdio_write (const void *buffer, size_t len)
 write len bytes from buffer into uart More...
 

Function Documentation

◆ stdio_available()

int stdio_available ( void  )

Get the number of bytes available for reading from stdio.

Warning
This function is only available if the implementation supports it and the stdio_available module is enabled.
Returns
number of available bytes

◆ stdio_read()

ssize_t stdio_read ( void *  buffer,
size_t  max_len 
)

read len bytes from stdio uart into buffer

Parameters
[out]bufferbuffer to read into
[in]max_lennr of bytes to read
Returns
nr of bytes read
<0 on error

◆ stdio_write()

ssize_t stdio_write ( const void *  buffer,
size_t  len 
)

write len bytes from buffer into uart

Parameters
[in]bufferbuffer to read from
[in]lennr of bytes to write
Returns
nr of bytes written
<0 on error