bspStdIo

Overview

The standard I/O bridge implements the putByteToStdout and getByteFromStdin C-linkage functions required by the OpenBSW logging framework, routing character-level I/O through the UART TERMINAL instance configured in bspUart Configuration.

putByteToStdout(uint8_t byte) transmits one byte over USART2 TX (PA2), blocking by polling until the UART TX register is free.

getByteFromStdin() attempts to read one byte from USART2 RX (PA3) and is non-blocking: if Uart::read() reports that no byte was received, it returns -1 (POSIX getchar() convention); otherwise it returns the byte value (0-255).

Both functions resolve the UART instance once into a static local reference, avoiding a global constructor ordering dependency.