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);
105#if IS_USED(MODULE_STDIO_NOTIFY) || DOXYGEN
129#if IS_USED(MODULE_STDIO_NOTIFY) || DOXYGEN
138#if IS_USED(MODULE_STDIO_NOTIFY) || DOXYGEN
173#if IS_USED(MODULE_STDIO_AVAILABLE) || DOXYGEN
229#if defined(MODULE_STDIO_DISPATCH) || DOXYGEN
238#define STDIO_PROVIDER(_type, _open, _close, _write) \
239 XFA_CONST(stdio_provider_t, stdio_provider_xfa, 0) stdio_ ##_type = { \
245#define STDIO_PROVIDER(_type, _open, _close, _write) \
246 void stdio_init(void) { \
247 void (*f)(void) = _open; \
252 void stdio_close(void) { \
253 void (*f)(void) = _close; \
258 ssize_t stdio_write(const void* buffer, size_t len) { \
259 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...
int isrpipe_write_one(isrpipe_t *isrpipe, uint8_t c)
Put one byte into the isrpipe's buffer.
int isrpipe_write(isrpipe_t *isrpipe, const uint8_t *buf, size_t n)
Put number of bytes into the isrpipe's buffer.
void stdio_close(void)
Disable stdio and detach stdio providers.
int stdio_rx_write(const uint8_t *buf, size_t len)
Push received bytes into stdin.
isrpipe_t stdin_isrpipe
isrpipe for writing stdin input to
void stdio_set_notify(stdio_notify_cb_t cb, void *arg)
Register a callback fired when data is available on stdin.
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_rx_write_one(uint8_t c)
Push a single received byte into stdin.
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_notify_cb_t)(void *arg)
Definition of a stdio notify callback.
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.