136 #ifndef ti_drivers_UART__include
137 #define ti_drivers_UART__include
157 #define UART_CMD_RESERVED 32
171 #define UART_STATUS_RESERVED -32
179 #define UART_STATUS_SUCCESS 0
187 #define UART_STATUS_ERROR -1
196 #define UART_STATUS_UNDEFINEDCMD -2
206 #define UART_CMD_PEEK 0
217 #define UART_CMD_ISAVAILABLE 1
228 #define UART_CMD_GETRXCOUNT 2
240 #define UART_CMD_RXENABLE 3
253 #define UART_CMD_RXDISABLE 4
255 #define UART_ERROR UART_STATUS_ERROR
260 #define UART_WAIT_FOREVER (~0)
581 extern int UART_control(UART_Handle handle,
unsigned int cmd,
void *arg);
670 extern int UART_write(UART_Handle handle,
const void *buffer,
size_t size);
736 extern int UART_read(UART_Handle handle,
void *buffer,
size_t size);
struct UART_Params UART_Params
UART Parameters.
UART_STOP
UART stop bit settings.
Definition: UART.h:379
struct UART_Config UART_Config
UART Global configuration.
void(* UART_CloseFxn)(UART_Handle handle)
A function pointer to a driver specific implementation of UART_CloseFxn().
Definition: UART.h:428
UART_Callback writeCallback
Definition: UART.h:411
int(* UART_ReadFxn)(UART_Handle handle, void *buffer, size_t size)
A function pointer to a driver specific implementation of UART_ReadFxn().
Definition: UART.h:454
void const * hwAttrs
Definition: UART.h:548
UART_LEN dataLength
Definition: UART.h:417
The definition of a UART function table that contains the required set of functions to control a spec...
Definition: UART.h:497
UART_Callback readCallback
Definition: UART.h:410
int UART_writePolling(UART_Handle handle, const void *buffer, size_t size)
Function that writes data to a UART, polling the peripheral to wait until new data can be written...
UART_PAR
UART parity type settings.
Definition: UART.h:389
unsigned int writeTimeout
Definition: UART.h:409
UART_ControlFxn controlFxn
Definition: UART.h:502
UART_Mode
UART mode settings.
Definition: UART.h:291
UART_Handle UART_open(unsigned int index, UART_Params *params)
Function to initialize a given UART peripheral.
UART_PAR parityType
Definition: UART.h:419
UART_DataMode
UART data mode settings.
Definition: UART.h:339
UART_Echo readEcho
Definition: UART.h:415
UART_ReturnMode
UART return mode settings.
Definition: UART.h:324
UART_WritePollingFxn writePollingFxn
Definition: UART.h:523
struct UART_Config * UART_Handle
A handle that is returned from a UART_open() call.
Definition: UART.h:265
struct UART_FxnTable UART_FxnTable
The definition of a UART function table that contains the required set of functions to control a spec...
void UART_close(UART_Handle handle)
Function to close a UART peripheral specified by the UART handle.
void UART_readCancel(UART_Handle handle)
Function that cancels a UART_read() function call.
UART_Echo
UART echo settings.
Definition: UART.h:357
int(* UART_ReadPollingFxn)(UART_Handle handle, void *buffer, size_t size)
A function pointer to a driver specific implementation of UART_ReadPollingFxn().
Definition: UART.h:461
int UART_read(UART_Handle handle, void *buffer, size_t size)
Function that reads data from a UART with interrupt enabled. This API must be used mutually exclusive...
UART_Mode writeMode
Definition: UART.h:407
int(* UART_ControlFxn)(UART_Handle handle, unsigned int cmd, void *arg)
A function pointer to a driver specific implementation of UART_ControlFxn().
Definition: UART.h:434
UART_STOP stopBits
Definition: UART.h:418
UART_ReturnMode readReturnMode
Definition: UART.h:412
UART_CloseFxn closeFxn
Definition: UART.h:499
void UART_init(void)
Function to initialize the UART module.
int UART_control(UART_Handle handle, unsigned int cmd, void *arg)
Function performs implementation specific features on a given UART_Handle.
uint32_t baudRate
Definition: UART.h:416
UART_Handle(* UART_OpenFxn)(UART_Handle handle, UART_Params *params)
A function pointer to a driver specific implementation of UART_OpenFxn().
Definition: UART.h:448
int(* UART_WriteFxn)(UART_Handle handle, const void *buffer, size_t size)
A function pointer to a driver specific implementation of UART_WriteFxn().
Definition: UART.h:474
void UART_Params_init(UART_Params *params)
Function to initialize the UART_Params struct to its defaults.
void UART_writeCancel(UART_Handle handle)
Function that cancels a UART_write() function call.
UART_DataMode readDataMode
Definition: UART.h:413
UART_WriteCancelFxn writeCancelFxn
Definition: UART.h:526
void(* UART_InitFxn)(UART_Handle handle)
A function pointer to a driver specific implementation of UART_InitFxn().
Definition: UART.h:442
UART_ReadPollingFxn readPollingFxn
Definition: UART.h:514
void(* UART_Callback)(UART_Handle, void *buf, size_t count)
The definition of a callback function used by the UART driver when used in UART_MODE_CALLBACK The cal...
Definition: UART.h:284
unsigned int readTimeout
Definition: UART.h:408
UART_ReadCancelFxn readCancelFxn
Definition: UART.h:517
int UART_readPolling(UART_Handle handle, void *buffer, size_t size)
Function that reads data from a UART without interrupts. This API must be used mutually exclusive wit...
UART_LEN
UART data length settings.
Definition: UART.h:367
void * custom
Definition: UART.h:420
void(* UART_ReadCancelFxn)(UART_Handle handle)
A function pointer to a driver specific implementation of UART_ReadCancelFxn().
Definition: UART.h:468
UART Parameters.
Definition: UART.h:405
UART_FxnTable const * fxnTablePtr
Definition: UART.h:542
UART_ReadFxn readFxn
Definition: UART.h:511
UART_OpenFxn openFxn
Definition: UART.h:508
void(* UART_WriteCancelFxn)(UART_Handle handle)
A function pointer to a driver specific implementation of UART_WriteCancelFxn().
Definition: UART.h:490
UART_DataMode writeDataMode
Definition: UART.h:414
UART_Mode readMode
Definition: UART.h:406
UART_WriteFxn writeFxn
Definition: UART.h:520
int(* UART_WritePollingFxn)(UART_Handle handle, const void *buffer, size_t size)
A function pointer to a driver specific implementation of UART_WritePollingFxn(). ...
Definition: UART.h:482
void * object
Definition: UART.h:545
UART Global configuration.
Definition: UART.h:540
UART_InitFxn initFxn
Definition: UART.h:505
int UART_write(UART_Handle handle, const void *buffer, size_t size)
Function that writes data to a UART with interrupts enabled. Usage of this API is mutually exclusive ...