|
px-fwlib 0.10.0
Cross-platform embedded library and documentation for 8/16/32-bit microcontrollers generated with Doxygen 1.9.2
|
Initialises the stdout stream to output to UART.
File(s):
This component initialises the stdout stream to output over UART.
px_uart_stdio_putchar() will intercept all line feed characters (\n) and replace it with a carriage return, line feed sequence (\r\n).
References:
Example:
Functions | |
| void | px_uart_stdio_init (px_uart_handle_t *handle) |
| Initialise stdout stream to use a UART driver. More... | |
| int | px_uart_stdio_putchar (char data, FILE *stream) |
| Function to send a byte. More... | |
| int | px_uart_stdio_getchar (FILE *stream) |
| Function to receive a byte. More... | |
| void px_uart_stdio_init | ( | px_uart_handle_t * | handle | ) |
Initialise stdout stream to use a UART driver.
px_uart_stdio_putchar() is provided as the handler for all outgoing data. A px_uart_stdout_stream structure is declared statically so that heap memory is not used (no malloc).
| handle | opened handle to UART peripheral |
Initialise stdout stream to use a UART driver.
px_uart_stdio_putchar() is provided as the handler for all outgoing data.
| handle | opened handle to UART peripheral |
Definition at line 94 of file px_uart_stdio.c.
| int px_uart_stdio_putchar | ( | char | data, |
| FILE * | stream | ||
| ) |
Function to send a byte.
Every carriage return ("\n") will be intercepted and replaced with a carriage return, new line sequence ("\r\n").
| data | byte to send |
| stream | stream to output data to (not used) |
Definition at line 54 of file px_uart_stdio.c.
| int px_uart_stdio_getchar | ( | FILE * | stream | ) |
Function to receive a byte.
This function will block until a character has been received.
| stream | stream to output data to (not used) |
Definition at line 69 of file px_uart_stdio.c.