26#if defined(MODULE_STDIO_DISPATCH)
34#ifndef STDIO_RX_BUFSIZE
38# define STDIO_RX_BUFSIZE (64)
77 ssize_t (*
write)(
const void *src,
size_t len);
90#if IS_USED(MODULE_STDIO_AVAILABLE) || DOXYGEN
146#if defined(MODULE_STDIO_DISPATCH) || DOXYGEN
155#define STDIO_PROVIDER(_type, _open, _close, _write) \
156 XFA_CONST(stdio_provider_t, stdio_provider_xfa, 0) stdio_ ##_type = { \
162#define STDIO_PROVIDER(_type, _open, _close, _write) \
163 void stdio_init(void) { \
164 void (*f)(void) = _open; \
169 void stdio_close(void) { \
170 void (*f)(void) = _close; \
175 ssize_t stdio_write(const void* buffer, size_t len) { \
176 return _write(buffer, len); \
Common macros and compiler attributes/pragmas configuration.
#define ACCESS(mode, ptr_idx, size_idx)
Emit an attribute (if supported by the compiler) that declares how a function will access its paramet...
void stdio_close(void)
Disable stdio and detach stdio providers.
isrpipe_t stdin_isrpipe
isrpipe for writing stdin input to
void stdio_init(void)
initialize the module
ssize_t stdio_read(void *buffer, size_t max_len)
Read len bytes from the STDIN into buffer.
int stdio_available(void)
Get the number of bytes available for reading from stdio.
ssize_t stdio_write(const void *buffer, size_t len)
Write len bytes from buffer into STDOUT.
void stdio_clear_stdin(void)
Clear the input buffer.
@ STDIO_ESP32_SERIAL_JTAG
stdio via ESP32 debug Serial/JTAG
@ STDIO_USBUS_CDC_ACM
stdio via USB CDC ACM (usbus)
@ STDIO_UART
stdio via UART
@ STDIO_RTT
stdio via Segger RTT
@ STDIO_TINYUSB_CDC_ACM
stdio via USB CDC ACM (TinyUSB)
@ STDIO_TELNET
stdio via telnet
@ STDIO_ETHOS
stdio via ethos (mutiplex)
@ STDIO_NIMBLE
stdio via BLE (NimBLE)
@ STDIO_SEMIHOSTING
stdio via Semihosting
@ STDIO_SLIP
stdio via SLIP (mutiplex)
Common macros and compiler attributes/pragmas configuration.
Context structure for isrpipe.
void(* open)(void)
Initialize and attach the stdio provider.
void(* close)(void)
Detach the stdio provider.
ssize_t(* write)(const void *src, size_t len)
Write len bytes from src into stdout.