254 #ifndef ti_drivers_UART__include 255 #define ti_drivers_UART__include 281 #define UART_CMD_RESERVED (32) 295 #define UART_STATUS_RESERVED (-32) 310 #define UART_STATUS_SUCCESS (0) 318 #define UART_STATUS_ERROR (-1) 327 #define UART_STATUS_UNDEFINEDCMD (-2) 346 #define UART_CMD_PEEK (0) 357 #define UART_CMD_ISAVAILABLE (1) 368 #define UART_CMD_GETRXCOUNT (2) 380 #define UART_CMD_RXENABLE (3) 393 #define UART_CMD_RXDISABLE (4) 398 #define UART_ERROR (UART_STATUS_ERROR) 403 #define UART_WAIT_FOREVER (~(0U)) 421 typedef void (*
UART_Callback) (UART_Handle handle,
void *buf,
size_t count);
577 typedef int_fast16_t (*
UART_ControlFxn) (UART_Handle handle, uint_fast16_t cmd,
void *arg);
594 typedef int_fast32_t (*
UART_ReadFxn) (UART_Handle handle,
void *buffer,
614 typedef int_fast32_t (*
UART_WriteFxn) (UART_Handle handle,
const void *buffer,
622 const void *buffer,
size_t size);
739 extern int_fast16_t
UART_control(UART_Handle handle, uint_fast16_t cmd,
void *arg);
839 extern int_fast32_t
UART_write(UART_Handle handle,
const void *buffer,
size_t size);
864 extern int_fast32_t
UART_writePolling(UART_Handle handle,
const void *buffer,
size_t size);
915 extern int_fast32_t
UART_read(UART_Handle handle,
void *buffer,
size_t size);
937 extern int_fast32_t
UART_readPolling(UART_Handle handle,
void *buffer,
size_t size);
UART_STOP
UART stop bit settings.
Definition: UART.h:523
void(* UART_CloseFxn)(UART_Handle handle)
A function pointer to a driver specific implementation of UART_CloseFxn().
Definition: UART.h:571
void * object
Definition: UART.h:683
UART_Callback writeCallback
Definition: UART.h:555
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_LEN dataLength
Definition: UART.h:561
The definition of a UART function table that contains the required set of functions to control a spec...
Definition: UART.h:635
UART_Callback readCallback
Definition: UART.h:554
UART_PAR
UART parity type settings.
Definition: UART.h:533
UART_ControlFxn controlFxn
Definition: UART.h:640
UART_Mode
UART mode settings.
Definition: UART.h:428
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:594
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:577
UART_PAR parityType
Definition: UART.h:563
UART_DataMode
UART data mode settings.
Definition: UART.h:483
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...
UART_Echo readEcho
Definition: UART.h:559
UART_ReturnMode
UART return mode settings.
Definition: UART.h:461
UART_WritePollingFxn writePollingFxn
Definition: UART.h:661
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:501
UART Global configuration.
Definition: UART.h:678
void const * hwAttrs
Definition: UART.h:686
UART_Mode writeMode
Definition: UART.h:551
UART_STOP stopBits
Definition: UART.h:562
UART_ReturnMode readReturnMode
Definition: UART.h:556
UART_CloseFxn closeFxn
Definition: UART.h:637
void UART_init(void)
Function to initialize the UART module.
uint32_t baudRate
Definition: UART.h:560
UART_Handle(* UART_OpenFxn)(UART_Handle handle, UART_Params *params)
A function pointer to a driver specific implementation of UART_OpenFxn().
Definition: UART.h:589
struct UART_Config_ UART_Config
UART Global configuration.
void UART_Params_init(UART_Params *params)
Function to initialize the UART_Params struct to its defaults.
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.
UART_DataMode readDataMode
Definition: UART.h:557
UART_WriteCancelFxn writeCancelFxn
Definition: UART.h:664
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:614
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:601
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:583
uint32_t readTimeout
Definition: UART.h:552
UART_Handle UART_open(uint_least8_t index, UART_Params *params)
Function to initialize a given UART peripheral.
UART_ReadPollingFxn readPollingFxn
Definition: UART.h:652
UART_ReadCancelFxn readCancelFxn
Definition: UART.h:655
UART_FxnTable const * fxnTablePtr
Definition: UART.h:680
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:621
UART_LEN
UART data length settings.
Definition: UART.h:511
void * custom
Definition: UART.h:564
void(* UART_ReadCancelFxn)(UART_Handle handle)
A function pointer to a driver specific implementation of UART_ReadCancelFxn().
Definition: UART.h:608
UART Parameters.
Definition: UART.h:549
struct UART_Config_ * UART_Handle
A handle that is returned from a UART_open() call.
Definition: UART.h:408
UART_ReadFxn readFxn
Definition: UART.h:649
int_fast32_t UART_read(UART_Handle handle, void *buffer, size_t size)
Function that reads data from a UART with interrupt enabled.
UART_OpenFxn openFxn
Definition: UART.h:646
void(* UART_WriteCancelFxn)(UART_Handle handle)
A function pointer to a driver specific implementation of UART_WriteCancelFxn().
Definition: UART.h:628
UART_DataMode writeDataMode
Definition: UART.h:558
UART_Mode readMode
Definition: UART.h:550
UART_WriteFxn writeFxn
Definition: UART.h:658
uint32_t writeTimeout
Definition: UART.h:553
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:421
UART_InitFxn initFxn
Definition: UART.h:643