XCORE SDK
XCORE Software Development Kit
|
API for UART I/O. More...
#include <stdlib.h>
#include <stdint.h>
#include <xcore/port.h>
#include <xcore/triggerable.h>
#include <xcore/hwtimer.h>
#include <xcore/interrupt.h>
#include "uart_util.h"
Go to the source code of this file.
Classes | |
struct | uart_tx_t |
struct | uart_rx_t |
Macros | |
#define | UART_START_BIT_ERROR_VAL 2 |
#define | HIL_UART_TX_CALLBACK_ATTR __attribute__((fptrgroup("hil_uart_tx_callback"))) |
#define | HIL_UART_RX_CALLBACK_ATTR __attribute__((fptrgroup("hil_uart_rx_callback"))) |
Typedefs | |
typedef enum uart_parity_t | uart_parity_t |
Enumerations | |
enum | uart_parity_t { UART_PARITY_NONE = 0 , UART_PARITY_EVEN , UART_PARITY_ODD } |
enum | uart_callback_code_t { UART_RX_COMPLETE = 0 , UART_UNDERRUN_ERROR = 1 , UART_START_BIT_ERROR = UART_START_BIT_ERROR_VAL , UART_PARITY_ERROR = UART_START_BIT_ERROR_VAL + 1 , UART_FRAMING_ERROR = UART_START_BIT_ERROR_VAL + 2 , UART_OVERRUN_ERROR = UART_START_BIT_ERROR_VAL + 3 } |
enum | uart_state_t { UART_IDLE = 0 , UART_START , UART_DATA , UART_PARITY , UART_STOP } |
Functions | |
void | uart_tx_init (uart_tx_t *uart, port_t tx_port, uint32_t baud_rate, uint8_t data_bits, uart_parity_t parity, uint8_t stop_bits, hwtimer_t tmr, uint8_t *tx_buff, size_t buffer_size_plus_one, void(*uart_tx_empty_callback_fptr)(void *app_data), void *app_data) |
void | uart_tx_blocking_init (uart_tx_t *uart, port_t tx_port, uint32_t baud_rate, uint8_t data_bits, uart_parity_t parity, uint8_t stop_bits, hwtimer_t tmr) |
void | uart_tx (uart_tx_t *uart, uint8_t data) |
void | uart_tx_deinit (uart_tx_t *uart) |
void | uart_rx_init (uart_rx_t *uart, port_t rx_port, uint32_t baud_rate, uint8_t data_bits, uart_parity_t parity, uint8_t stop_bits, hwtimer_t tmr, uint8_t *rx_buff, size_t buffer_size_plus_one, void(*uart_rx_complete_callback_fptr)(void *app_data), void(*uart_rx_error_callback_fptr)(uart_callback_code_t callback_code, void *app_data), void *app_data) |
void | uart_rx_blocking_init (uart_rx_t *uart, port_t rx_port, uint32_t baud_rate, uint8_t data_bits, uart_parity_t parity, uint8_t stop_bits, hwtimer_t tmr, void(*uart_rx_error_callback_fptr)(uart_callback_code_t callback_code, void *app_data), void *app_data) |
uint8_t | uart_rx (uart_rx_t *uart) |
void | uart_rx_deinit (uart_rx_t *uart) |
API for UART I/O.