45 #define IOT_UART_BAUD_RATE_DEFAULT ( 115200 ) 50 #define IOT_UART_SUCCESS ( 0 ) 51 #define IOT_UART_INVALID_VALUE ( 1 ) 52 #define IOT_UART_WRITE_FAILED ( 2 ) 53 #define IOT_UART_READ_FAILED ( 3 ) 54 #define IOT_UART_BUSY ( 4 ) 55 #define IOT_UART_NOTHING_TO_CANCEL ( 5 ) 56 #define IOT_UART_FUNCTION_NOT_SUPPORTED ( 6 ) 97 void * pvUserContext );
103 struct IotUARTDescriptor_t;
206 void * pvUserContext );
236 uint8_t *
const pvBuffer,
263 uint8_t *
const pvBuffer,
294 uint8_t *
const pvBuffer,
325 uint8_t *
const pvBuffer,
371 void *
const pvBuffer );
Definition: iot_uart.h:84
int32_t iot_uart_read_async(IotUARTHandle_t const pxUartPeripheral, uint8_t *const pvBuffer, size_t xBytes)
Starts receiving the data from UART asynchronously.
Definition: iot_uart.h:75
Definition: iot_uart.h:65
uint8_t ucWordlength
Definition: iot_uart.h:134
IotUARTParity_t
UART parity mode.
Definition: iot_uart.h:71
Definition: iot_uart.h:73
struct IotUARTDescriptor_t * IotUARTHandle_t
IotUARTHandle_t is the handle type returned by calling iot_uart_open(). This is initialized in open a...
Definition: iot_uart.h:110
Definition: iot_uart.h:118
void(* IotUARTCallback_t)(IotUARTOperationStatus_t xStatus, void *pvUserContext)
The callback function for completion of UART operation.
Definition: iot_uart.h:96
int32_t iot_uart_cancel(IotUARTHandle_t const pxUartPeripheral)
Aborts the operation on the UART port if any underlying driver allows cancellation of the operation...
int32_t iot_uart_write_async(IotUARTHandle_t const pxUartPeripheral, uint8_t *const pvBuffer, size_t xBytes)
Starts the transmission of data from UART asynchronously.
uint32_t ulBaudrate
Definition: iot_uart.h:131
void iot_uart_set_callback(IotUARTHandle_t const pxUartPeripheral, IotUARTCallback_t xCallback, void *pvUserContext)
Sets the application callback to be called on completion of an operation.
int32_t iot_uart_ioctl(IotUARTHandle_t const pxUartPeripheral, IotUARTIoctlRequest_t xUartRequest, void *const pvBuffer)
Configures the UART port with user configuration.
IotUARTStopBits_t
UART stop bits.
Definition: iot_uart.h:81
IotUARTHandle_t iot_uart_open(int32_t lUartInstance)
Initializes the UART peripheral of the board.
IotUARTOperationStatus_t
UART read/write operation status values.
Definition: iot_uart.h:61
int32_t iot_uart_read_sync(IotUARTHandle_t const pxUartPeripheral, uint8_t *const pvBuffer, size_t xBytes)
Starts receiving the data from UART synchronously.
Definition: iot_uart.h:120
int32_t iot_uart_write_sync(IotUARTHandle_t const pxUartPeripheral, uint8_t *const pvBuffer, size_t xBytes)
Starts the transmission of data from UART synchronously.
IotUARTIoctlRequest_t
Ioctl requests for UART HAL.
Definition: iot_uart.h:115
IotUARTParity_t xParity
Definition: iot_uart.h:132
uint8_t ucFlowControl
Definition: iot_uart.h:135
Definition: iot_uart.h:83
#define IOT_UART_READ_FAILED
Definition: iot_uart.h:53
Configuration parameters for the UART.
Definition: iot_uart.h:129
Definition: iot_uart.h:74
Definition: iot_uart.h:119
#define IOT_UART_SUCCESS
Error codes returned by every function module in UART HAL.
Definition: iot_uart.h:50
IotUARTStopBits_t xStopbits
Definition: iot_uart.h:133
Definition: iot_uart.h:63
int32_t iot_uart_close(IotUARTHandle_t const pxUartPeripheral)
Stops the operation and de-initializes the UART peripheral.
Definition: iot_uart.h:64
#define IOT_UART_WRITE_FAILED
Definition: iot_uart.h:52