UART
Files | |
file | k_uart.h |
UART interface. | |
Data Structures | |
struct | uart_conf |
Usart configuration, to be used with the uart_init call. More... | |
Typedefs | |
typedef void(* | uart_callback_t) (void *extra_data, uint8_t *buf, int len, void *pxTaskWoken) |
In order to catch incoming chars use the callback. More... | |
Functions | |
void | uart_init (struct uart_conf *conf) |
Initialise UART with the uart_conf data structure. More... | |
void | uart_set_callback (void *arg, uart_callback_t callback) |
void | uart_insert (char c, void *pxTaskWoken) |
Insert a character to the RX buffer of a uart. More... | |
void | uart_putc (char c) |
Polling putchar. More... | |
void | uart_putstr (char *buf, int len) |
Send char buffer on UART. More... | |
char | uart_getc (void) |
Buffered getchar. More... | |
int | uart_messages_waiting (int handle) |
Typedef Documentation
typedef void(* uart_callback_t) (void *extra_data, uint8_t *buf, int len, void *pxTaskWoken) |
In order to catch incoming chars use the callback.
Only one callback per interface.
- Parameters
-
handle uart[0,1,2,3] callback function pointer
Function Documentation
char uart_getc | ( | void | ) |
Buffered getchar.
- Parameters
-
handle uart[0,1,2,3]
- Returns
- Character received
void uart_init | ( | struct uart_conf * | conf | ) |
void uart_insert | ( | char | c, |
void * | pxTaskWoken | ||
) |
Insert a character to the RX buffer of a uart.
- Parameters
-
handle uart[0,1,2,3] c Character to insert
int uart_messages_waiting | ( | int | handle | ) |
void uart_putc | ( | char | c | ) |
Polling putchar.
- Parameters
-
handle uart[0,1,2,3] c Character to transmit
void uart_putstr | ( | char * | buf, |
int | len | ||
) |
Send char buffer on UART.
- Parameters
-
handle uart[0,1,2,3] buf Pointer to data len Length of data
void uart_set_callback | ( | void * | arg, |
uart_callback_t | callback | ||
) |