|
void | UART_close (UART_Handle uartHnd) |
| Function to closes a given UART peripheral specified by the UART handle. More...
|
|
int32_t | UART_control (UART_Handle uartHnd, uint32_t cmd, void *arg) |
| Function performs implementation specific features on a given UART_Handle. More...
|
|
void | UART_init (void) |
| Function to initializes the UART module. More...
|
|
UART_Handle | UART_open (uint32_t idx, UART_Params *uartParams) |
| Function to initialize a given UART peripheral specified by the particular index value. The parameter specifies which mode the UART will operate. More...
|
|
void | UART_Params_init (UART_Params *uartParams) |
| Function to initialize the UART_Params struct to its defaults. More...
|
|
int32_t | UART_write (UART_Handle uartHnd, const void *buffer, size_t size) |
| Function that writes data to a UART. More...
|
|
int32_t | UART_writePolling (UART_Handle uartHnd, const void *buffer, size_t size) |
| Function that writes data to a UART. More...
|
|
void | UART_writeCancel (UART_Handle handle) |
| Function that cancels a UART_write function call. More...
|
|
int32_t | UART_read (UART_Handle handle, void *buffer, size_t size) |
| Function that read data from a UART. More...
|
|
int32_t | UART_readPolling (UART_Handle handle, void *buffer, size_t size) |
| Function that reads data from a UART. More...
|
|
void | UART_readCancel (UART_Handle handle) |
| Function that cancels a UART_read function call. More...
|
|
int32_t | UART_read2 (UART_Handle handle, UART_Transaction *uartTrans) |
| Extended function that read data from a UART. More...
|
|
int32_t | UART_write2 (UART_Handle handle, UART_Transaction *uartTrans) |
| Extended function that writes data to a UART. More...
|
|
void | UART_transactionInit (UART_Transaction *uartTrans) |
| Function to initialize the UART_Transaction struct to its defaults. More...
|
|
|
typedef struct UART_Config_s * | UART_Handle |
| A handle that is returned from a UART_open() call. More...
|
|
typedef void(* | UART_Callback) (UART_Handle handle, void *buf, size_t count) |
| The definition of a callback function used by the UART driver when used in UART_MODE_CALLBACK. More...
|
|
typedef void(* | UART_Callback2) (UART_Handle handle, UART_Transaction *transaction) |
| The definition of a callback2 function used by the UART driver when used in UART_MODE_CALLBACK. More...
|
|
typedef void(* | UART_CloseFxn) (UART_Handle handle) |
| A function pointer to a driver specific implementation of UART_CloseFxn(). More...
|
|
typedef int32_t(* | UART_ControlFxn) (UART_Handle handle, uint32_t cmd, void *arg) |
| A function pointer to a driver specific implementation of UART_ControlFxn(). More...
|
|
typedef void(* | UART_InitFxn) (UART_Handle handle) |
| A function pointer to a driver specific implementation of UART_InitFxn(). More...
|
|
typedef UART_Handle(* | UART_OpenFxn) (UART_Handle handle, const UART_Params *params) |
| A function pointer to a driver specific implementation of UART_OpenFxn(). More...
|
|
typedef int32_t(* | UART_ReadFxn) (UART_Handle handle, void *buffer, size_t size) |
| A function pointer to a driver specific implementation of UART_ReadFxn(). More...
|
|
typedef int32_t(* | UART_ReadPollingFxn) (UART_Handle handle, void *buffer, size_t size) |
| A function pointer to a driver specific implementation of UART_ReadPollingFxn(). More...
|
|
typedef void(* | UART_ReadCancelFxn) (UART_Handle handle) |
| A function pointer to a driver specific implementation of UART_ReadCancelFxn(). More...
|
|
typedef int32_t(* | UART_WriteFxn) (UART_Handle handle, const void *buffer, size_t size) |
| A function pointer to a driver specific implementation of UART_CloseFxn(). More...
|
|
typedef int32_t(* | UART_WritePollingFxn) (UART_Handle handle, const void *buffer, size_t size) |
| A function pointer to a driver specific implementation of UART_WritePollingFxn(). More...
|
|
typedef void(* | UART_WriteCancelFxn) (UART_Handle handle) |
| A function pointer to a driver specific implementation of UART_WriteCancelFxn(). More...
|
|
typedef int32_t(* | UART_ReadFxn2) (UART_Handle handle, UART_Transaction *transaction) |
| A function pointer to a driver specific implementation of UART_ReadFxn2(). More...
|
|
typedef int32_t(* | UART_WriteFxn2) (UART_Handle handle, UART_Transaction *transaction) |
| A function pointer to a driver specific implementation of UART_WriteFxn2(). More...
|
|
typedef UART_Config | UART_config_list[UART_MAX_CONFIG_CNT] |
|
|
enum | UART_TransferApiVer { UART_TRANSFER_API_VER_1 = 1,
UART_TRANSFER_API_VER_2 = 2
} |
| Transfer API version. More...
|
|
enum | UART_TransferStatus {
UART_TRANSFER_STATUS_SUCCESS = 0,
UART_TRANSFER_STATUS_TIMEOUT,
UART_TRANSFER_STATUS_ERROR_BI,
UART_TRANSFER_STATUS_ERROR_FE,
UART_TRANSFER_STATUS_ERROR_PE,
UART_TRANSFER_STATUS_ERROR_OE,
UART_TRANSFER_STATUS_ERROR_OTH
} |
| Transfer status codes that are set by the UART driver. More...
|
|
enum | UART_Mode { UART_MODE_BLOCKING,
UART_MODE_CALLBACK
} |
| UART mode settings. More...
|
|
enum | UART_ReturnMode { UART_RETURN_FULL,
UART_RETURN_NEWLINE
} |
| UART return mode settings. More...
|
|
enum | UART_DataMode { UART_DATA_BINARY,
UART_DATA_TEXT
} |
| UART data mode settings. More...
|
|
enum | UART_Echo { UART_ECHO_OFF = 0,
UART_ECHO_ON = 1
} |
| UART echo settings. More...
|
|
enum | UART_LEN { UART_LEN_5 = 0,
UART_LEN_6 = 1,
UART_LEN_7 = 2,
UART_LEN_8 = 3
} |
| UART data length settings. More...
|
|
enum | UART_STOP { UART_STOP_ONE = 0,
UART_STOP_TWO = 1
} |
| UART stop bit settings. More...
|
|
enum | UART_PAR {
UART_PAR_NONE = 0,
UART_PAR_EVEN = 1,
UART_PAR_ODD = 2,
UART_PAR_ZERO = 3,
UART_PAR_ONE = 4
} |
| UART parity type settings. More...
|
|
enum | UART_FC_TYPE { UART_FC_NONE = 0,
UART_FC_HW = 1
} |
| UART flow control settings. More...
|
|
int32_t UART_write |
( |
UART_Handle |
uartHnd, |
|
|
const void * |
buffer, |
|
|
size_t |
size |
|
) |
| |
Function that writes data to a UART.
This function initiates an operation to write data to a UART controller.
In UART_MODE_BLOCKING, UART_write will block task execution until all the data in buffer has been written.
In UART_MODE_CALLBACK, UART_write does not block task execution an calls a callback function specified by writeCallback.
- Parameters
-
uartHnd | A UART_Handle |
buffer | A pointer to buffer containing data to be written |
size | The number of bytes in buffer that should be written onto the UART. |
- Returns
- Returns the number of bytes that have been written to the UART, UART_ERROR on an error.
int32_t UART_read |
( |
UART_Handle |
handle, |
|
|
void * |
buffer, |
|
|
size_t |
size |
|
) |
| |
Function that read data from a UART.
This function initiates an operation to read data from a UART controller.
In UART_MODE_BLOCKING, UART_read will block task execution until all the data in buffer has been read.
In UART_MODE_CALLBACK, UART_read does not block task execution an calls a callback function specified by readCallback.
- Parameters
-
handle | A UART_Handle |
buffer | A pointer to an empty buffer in which data should be written to |
size | The number of bytes to be written into buffer |
- Returns
- Returns the number of bytes that have been read from the UART, UART_ERROR on an error.
Extended function that read data from a UART.
This function initiates an operation to read data from a UART controller.
In UART_MODE_BLOCKING, UART_read2 will block task execution until all the data in buffer has been read.
In UART_MODE_CALLBACK, UART_read2 does not block task execution an calls a callback function specified by readCallback.
- Parameters
-
handle | A UART_Handle |
uartTrans | A pointer to a UART_Transaction. All of the fields within transaction except UART_Transaction.count and UART_Transaction.status are WO (write-only) unless otherwise noted in the driver implementations. If a transaction timeout or error has occured, UART_Transaction.count will contain the number of bytes that were transferred. In the callback mode, the application allocates transaction memory and UART driver owns the pointer unitil it is returned to the application via the callback function, thus the memory should not be allocated on the stack, and dynamic free must occur in the callback (not immediately after calling read2/write2) |
- Returns
- Returns UART_SUCCESS or UART_ERROR on an error.
Extended function that writes data to a UART.
This function initiates an operation to write data to a UART controller.
In UART_MODE_BLOCKING, UART_write will block task execution until all the data in buffer has been written.
In UART_MODE_CALLBACK, UART_write does not block task execution an calls a callback function specified by writeCallback.
- Parameters
-
handle | A UART_Handle |
uartTrans | A pointer to a UART_Transaction. All of the fields within transaction except UART_Transaction.count and UART_Transaction.status are WO (write-only) unless otherwise noted in the driver implementations. If a transaction timeout or error has occured, UART_Transaction.count will contain the number of bytes that were transferred. In the callback mode, the application allocates transaction memory and UART driver owns the pointer unitil it is returned to the application via the callback function, thus the memory should not be allocated on the stack, and dynamic free must occur in the callback (not immediately after calling read2/write2) |
- Returns
- Returns UART_SUCCESS or UART_ERROR on an error.