261 #ifndef ti_drivers_UART__include
262 #define ti_drivers_UART__include
288 #define UART_CMD_RESERVED (32)
302 #define UART_STATUS_RESERVED (-32)
317 #define UART_STATUS_SUCCESS (0)
325 #define UART_STATUS_ERROR (-1)
334 #define UART_STATUS_UNDEFINEDCMD (-2)
353 #define UART_CMD_PEEK (0)
364 #define UART_CMD_ISAVAILABLE (1)
375 #define UART_CMD_GETRXCOUNT (2)
387 #define UART_CMD_RXENABLE (3)
400 #define UART_CMD_RXDISABLE (4)
405 #define UART_ERROR (UART_STATUS_ERROR)
410 #define UART_WAIT_FOREVER (~(0U))
434 typedef void (*
UART_Callback) (UART_Handle handle,
void *buf,
size_t count);
590 typedef int_fast16_t (*
UART_ControlFxn) (UART_Handle handle, uint_fast16_t cmd,
void *arg);
607 typedef int_fast32_t (*
UART_ReadFxn) (UART_Handle handle,
void *buffer,
627 typedef int_fast32_t (*
UART_WriteFxn) (UART_Handle handle,
const void *buffer,
635 const void *buffer,
size_t size);
752 extern int_fast16_t
UART_control(UART_Handle handle, uint_fast16_t cmd,
void *arg);
849 extern int_fast32_t
UART_write(UART_Handle handle,
const void *buffer,
size_t size);
874 extern int_fast32_t
UART_writePolling(UART_Handle handle,
const void *buffer,
size_t size);
925 extern int_fast32_t
UART_read(UART_Handle handle,
void *buffer,
size_t size);
947 extern int_fast32_t
UART_readPolling(UART_Handle handle,
void *buffer,
size_t size);
UART_Mode writeMode
Definition: UART.h:564
UART_WriteFxn writeFxn
Definition: UART.h:671
UART_Mode readMode
Definition: UART.h:563
uint32_t baudRate
Definition: UART.h:573
void(* UART_CloseFxn)(UART_Handle handle)
A function pointer to a driver specific implementation of UART_CloseFxn().
Definition: UART.h:584
enum UART_Echo_ UART_Echo
UART echo settings.
UART_Callback writeCallback
Definition: UART.h:568
void * object
Definition: UART.h:696
UART_CloseFxn closeFxn
Definition: UART.h:650
struct UART_Params_ UART_Params
UART Parameters.
UART_ReturnMode_
UART return mode settings.
Definition: UART.h:474
int_fast16_t UART_control(UART_Handle handle, uint_fast16_t cmd, void *arg)
Function performs implementation specific features on a given UART_Handle.
UART_ReadPollingFxn readPollingFxn
Definition: UART.h:665
UART_Callback readCallback
Definition: UART.h:567
enum UART_PAR_ UART_PAR
UART parity type settings.
enum UART_LEN_ UART_LEN
UART data length settings.
enum UART_Mode_ UART_Mode
UART mode settings.
UART_LEN dataLength
Definition: UART.h:574
int_fast32_t(* UART_ReadFxn)(UART_Handle handle, void *buffer, size_t size)
A function pointer to a driver specific implementation of UART_ReadFxn().
Definition: UART.h:607
int_fast16_t(* UART_ControlFxn)(UART_Handle handle, uint_fast16_t cmd, void *arg)
A function pointer to a driver specific implementation of UART_ControlFxn().
Definition: UART.h:590
UART_STOP_
UART stop bit settings.
Definition: UART.h:536
UART_DataMode writeDataMode
Definition: UART.h:571
int_fast32_t 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...
void * custom
Definition: UART.h:577
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.
struct UART_FxnTable_ UART_FxnTable
The definition of a UART function table that contains the required set of functions to control a spec...
UART Global configuration.
Definition: UART.h:691
void const * hwAttrs
Definition: UART.h:699
void UART_init(void)
Function to initialize the UART module.
UART_OpenFxn openFxn
Definition: UART.h:659
UART_LEN_
UART data length settings.
Definition: UART.h:524
UART_ReadCancelFxn readCancelFxn
Definition: UART.h:668
UART_STOP stopBits
Definition: UART.h:575
UART_Handle(* UART_OpenFxn)(UART_Handle handle, UART_Params *params)
A function pointer to a driver specific implementation of UART_OpenFxn().
Definition: UART.h:602
struct UART_Config_ UART_Config
UART Global configuration.
The definition of a UART function table that contains the required set of functions to control a spec...
Definition: UART.h:648
void UART_Params_init(UART_Params *params)
Function to initialize the UART_Params struct to its defaults.
UART_WriteCancelFxn writeCancelFxn
Definition: UART.h:677
int_fast32_t UART_write(UART_Handle handle, const void *buffer, size_t size)
Function that writes data to a UART with interrupts enabled.
void UART_writeCancel(UART_Handle handle)
Function that cancels a UART_write() function call.
int_fast32_t(* 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:627
int_fast32_t(* UART_ReadPollingFxn)(UART_Handle handle, void *buffer, size_t size)
A function pointer to a driver specific implementation of UART_ReadPollingFxn().
Definition: UART.h:614
UART_PAR_
UART parity type settings.
Definition: UART.h:546
int_fast32_t 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...
void(* UART_InitFxn)(UART_Handle handle)
A function pointer to a driver specific implementation of UART_InitFxn().
Definition: UART.h:596
UART_Handle UART_open(uint_least8_t index, UART_Params *params)
Function to initialize a given UART peripheral.
enum UART_STOP_ UART_STOP
UART stop bit settings.
enum UART_ReturnMode_ UART_ReturnMode
UART return mode settings.
uint32_t writeTimeout
Definition: UART.h:566
UART_Echo readEcho
Definition: UART.h:572
UART_FxnTable const * fxnTablePtr
Definition: UART.h:693
int_fast32_t(* 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:634
UART Parameters.
Definition: UART.h:562
void(* UART_ReadCancelFxn)(UART_Handle handle)
A function pointer to a driver specific implementation of UART_ReadCancelFxn().
Definition: UART.h:621
UART_ControlFxn controlFxn
Definition: UART.h:653
UART_ReturnMode readReturnMode
Definition: UART.h:569
struct UART_Config_ * UART_Handle
A handle that is returned from a UART_open() call.
Definition: UART.h:415
UART_DataMode readDataMode
Definition: UART.h:570
int_fast32_t UART_read(UART_Handle handle, void *buffer, size_t size)
Function that reads data from a UART with interrupt enabled.
UART_ReadFxn readFxn
Definition: UART.h:662
UART_DataMode_
UART data mode settings.
Definition: UART.h:496
UART_PAR parityType
Definition: UART.h:576
UART_Echo_
UART echo settings.
Definition: UART.h:514
void(* UART_WriteCancelFxn)(UART_Handle handle)
A function pointer to a driver specific implementation of UART_WriteCancelFxn().
Definition: UART.h:641
UART_InitFxn initFxn
Definition: UART.h:656
uint32_t readTimeout
Definition: UART.h:565
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 The cal...
Definition: UART.h:434
UART_Mode_
UART mode settings.
Definition: UART.h:441
enum UART_DataMode_ UART_DataMode
UART data mode settings.
UART_WritePollingFxn writePollingFxn
Definition: UART.h:674