|
libws libws
WSwan hardware library for the Wonderful toolchain
|
Enumerations | |
| enum | ws_uart_baud_rate_t { WS_UART_BAUD_RATE_9600 = WS_UART_CTRL_BAUD_9600 , WS_UART_BAUD_RATE_38400 = WS_UART_CTRL_BAUD_38400 } |
| UART baud rate. More... | |
Functions | |
| static void | ws_uart_open (uint8_t baud_rate) |
| Open the UART (EXT port) connection. | |
| static void | ws_uart_close (void) |
| Close the UART (EXT port) connection. | |
| static bool | ws_uart_is_opened (void) |
| Check if an UART connection is currently opened. | |
| static bool | ws_uart_is_rx_overrun (void) |
| Check if the UART receive buffer has overflowed. | |
| static void | ws_uart_ack_rx_overrun (void) |
| Acknowledge that the UART receive buffer has overflowed. | |
| static bool | ws_uart_is_rx_ready (void) |
| Does the UART receive buffer contain a byte? | |
| static bool | ws_uart_is_tx_ready (void) |
| Is the UART transmit buffer ready to accept a byte? | |
| uint8_t | ws_uart_getc (void) |
| Read a character from the UART. | |
| int16_t | ws_uart_getc_nonblock (void) |
| Try to read a character from the UART. | |
| void | ws_uart_putc (uint8_t value) |
| Write a character to the UART. | |
| enum ws_uart_baud_rate_t |
|
inlinestatic |
|
inlinestatic |
| uint8_t ws_uart_getc | ( | void | ) |
Read a character from the UART.
This function blocks until a character is successfully read.
| int16_t ws_uart_getc_nonblock | ( | void | ) |
Try to read a character from the UART.
|
inlinestatic |
|
inlinestatic |
|
inlinestatic |
|
inlinestatic |
|
inlinestatic |
Open the UART (EXT port) connection.
| baud_rate | The baud rate to use for the connection. |
| void ws_uart_putc | ( | uint8_t | value | ) |
Write a character to the UART.
This ufnction blocks until a character is successfully written.
| value | The character to write. |