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 )
98 void * pvUserContext );
104struct IotUARTDescriptor;
207 void * pvUserContext );
237 uint8_t *
const pvBuffer,
264 uint8_t *
const pvBuffer,
295 uint8_t *
const pvBuffer,
326 uint8_t *
const pvBuffer,
372 void *
const pvBuffer );
void(* IotUARTCallback_t)(IotUARTOperationStatus_t xStatus, void *pvUserContext)
The callback function for completion of UART operation.
Definition: iot_uart.h:97
int32_t iot_uart_read_sync(IotUARTHandle_t const pxUartPeripheral, uint8_t *const pvBuffer, size_t xBytes)
Starts receiving the data from UART synchronously.
IotUARTOperationStatus_t
UART read/write operation status values.
Definition: iot_uart.h:62
IotUARTHandle_t iot_uart_open(int32_t lUartInstance)
Initializes the UART peripheral of the board.
int32_t iot_uart_read_async(IotUARTHandle_t const pxUartPeripheral, uint8_t *const pvBuffer, size_t xBytes)
Starts receiving the data from UART asynchronously.
IotUARTIoctlRequest_t
Ioctl requests for UART HAL.
Definition: iot_uart.h:117
IotUARTStopBits_t
UART stop bits.
Definition: iot_uart.h:83
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.
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.
IotUARTParity_t
UART parity mode.
Definition: iot_uart.h:73
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.
struct IotUARTDescriptor * IotUARTHandle_t
IotUARTHandle_t is the handle type returned by calling iot_uart_open(). This is initialized in open a...
Definition: iot_uart.h:111
int32_t iot_uart_close(IotUARTHandle_t const pxUartPeripheral)
Stops the operation and de-initializes the UART peripheral.
@ eUartLastReadFailed
Definition: iot_uart.h:66
@ eUartLastWriteFailed
Definition: iot_uart.h:65
@ eUartReadCompleted
Definition: iot_uart.h:64
@ eUartWriteCompleted
Definition: iot_uart.h:63
@ eGetRxNoOfbytes
Definition: iot_uart.h:121
@ eUartGetConfig
Definition: iot_uart.h:119
@ eGetTxNoOfbytes
Definition: iot_uart.h:120
@ eUartStopBitsTwo
Definition: iot_uart.h:85
@ eUartStopBitsOne
Definition: iot_uart.h:84
@ eUartParityEven
Definition: iot_uart.h:76
@ eUartParityNone
Definition: iot_uart.h:74
@ eUartParityOdd
Definition: iot_uart.h:75
Configuration parameters for the UART.
Definition: iot_uart.h:131
IotUARTStopBits_t xStopbits
Definition: iot_uart.h:134
uint32_t ulBaudrate
Definition: iot_uart.h:132
uint8_t ucWordlength
Definition: iot_uart.h:135
uint8_t ucFlowControl
Definition: iot_uart.h:136
IotUARTParity_t xParity
Definition: iot_uart.h:133