Interface definition for half-duplex UART driver. More...
Interface definition for half-duplex UART driver.
Definition in file uart_half_duplex.h.
Go to the source code of this file.
Data Structures | |
struct | uart_half_duplex_dir_t |
half-duplex UART direction management method type More... | |
struct | uart_half_duplex_params_t |
Configuration for half-duplex UART. More... | |
struct | uart_half_duplex_t |
Descriptor struct for half-duplex UART. More... | |
Macros | |
#define | UART_HALF_DUPLEX_DEFAULT_TIMEOUT_US (20000LU) |
Default recv timeout (in microseconds) | |
#define | UART_HALF_DUPLEX_DIR_NONE { NULL, NULL, NULL } |
Don't manage direction. | |
Enumerations | |
enum | { UART_HALF_DUPLEX_OK = UART_OK, UART_HALF_DUPLEX_NODEV = UART_NODEV, UART_HALF_DUPLEX_NOBAUD = UART_NOBAUD, UART_HALF_DUPLEX_INTERR = UART_INTERR, UART_HALF_DUPLEX_NOMODE = UART_NOMODE, UART_HALF_DUPLEX_NOBUFF = -5 } |
Possible UART_HALF_DUPLEX return values. More... | |
Functions | |
int | uart_half_duplex_init (uart_half_duplex_t *dev, uint8_t *buffer, size_t buffer_max_size, const uart_half_duplex_params_t *params) |
Initialize the half-duplex UART bus to communicate with devices. More... | |
static void | uart_half_duplex_set_tx (uart_half_duplex_t *dev) |
Set the half-duplex UART bus in TX mode. More... | |
static void | uart_half_duplex_set_rx (uart_half_duplex_t *dev) |
Set the half-duplex UART bus in RX mode. More... | |
size_t | uart_half_duplex_send (const uart_half_duplex_t *dev, size_t size) |
Send the data contained in the driver's buffer. More... | |
size_t | uart_half_duplex_recv (const uart_half_duplex_t *dev, size_t size) |
Recv data an fill the driver's buffer. More... | |