|
AM273x MCU+ SDK
09.02.00
|
|
Go to the documentation of this file.
59 #include <drivers/hw_include/cslr.h>
60 #include <drivers/hw_include/cslr_uart.h>
61 #include <drivers/hw_include/hw_types.h>
84 #define UART_TRANSFER_STATUS_SUCCESS (0U)
86 #define UART_TRANSFER_STATUS_TIMEOUT (1U)
88 #define UART_TRANSFER_STATUS_ERROR_BI (2U)
90 #define UART_TRANSFER_STATUS_ERROR_FE (3U)
92 #define UART_TRANSFER_STATUS_ERROR_PE (4U)
94 #define UART_TRANSFER_STATUS_ERROR_OE (5U)
96 #define UART_TRANSFER_STATUS_CANCELLED (6U)
98 #define UART_TRANSFER_STATUS_STARTED (7U)
100 #define UART_TRANSFER_STATUS_READ_TIMEOUT (8U)
102 #define UART_TRANSFER_STATUS_ERROR_INUSE (9U)
104 #define UART_TRANSFER_STATUS_ERROR_OTH (10U)
126 #define UART_TRANSFER_MODE_BLOCKING (0U)
131 #define UART_TRANSFER_MODE_CALLBACK (1U)
142 #define UART_LEN_1 (0U)
143 #define UART_LEN_2 (1U)
144 #define UART_LEN_3 (2U)
145 #define UART_LEN_4 (3U)
146 #define UART_LEN_5 (4U)
147 #define UART_LEN_6 (5U)
148 #define UART_LEN_7 (6U)
149 #define UART_LEN_8 (7U)
160 #define UART_STOPBITS_1 (0U)
161 #define UART_STOPBITS_2 (1U)
172 #define UART_PARITY_NONE (0x00U)
173 #define UART_PARITY_ODD (0x01U)
174 #define UART_PARITY_EVEN (0x03U)
186 #define UART_CONFIG_MODE_POLLED (0x00U)
187 #define UART_CONFIG_MODE_INTERRUPT (0x01U)
188 #define UART_CONFIG_MODE_USER_INTR (0x02U)
189 #define UART_CONFIG_MODE_DMA (0x03U)
void UART_deinit(void)
This function de-initializes the UART module.
void * readTransferSem
Definition: uart_sci.h:363
#define UART_TRANSFER_MODE_BLOCKING
UART read/write APIs blocks execution. This mode can only be used when called within a Task context.
Definition: uart_sci.h:126
SemaphoreP_Object lockObj
Definition: uart_sci.h:361
uint8_t shiftJustification
Definition: uart_sci.h:385
static void UART_Transaction_init(UART_Transaction *trans)
Function to initialize the UART_Transaction struct to its defaults.
Definition: uart_sci.h:664
SemaphoreP_Object readTransferSemObj
Definition: uart_sci.h:366
uint32_t edmaParam
Definition: uart_sci.h:296
#define UART_STOPBITS_1
Definition: uart_sci.h:160
#define UART_TRANSFER_STATUS_SUCCESS
Transaction success.
Definition: uart_sci.h:84
CSL_sciRegs * pSCIRegs
Definition: uart_sci.h:383
UART_Handle handle
Definition: uart_sci.h:321
void * hwiHandle
Definition: uart_sci.h:373
const void * writeBuf
Definition: uart_sci.h:328
EDMA interrupt configuration object. The object is passed to the EDMA_registerIntr() function....
Definition: edma/v0/edma.h:479
uint32_t timeout
Definition: uart_sci.h:209
UART_EdmaParams rxEdmaParams
Definition: uart_sci.h:377
void * UART_Handle
A handle that is returned from a UART_open() call.
Definition: uart_sci.h:73
UART_Transaction * writeTrans
Definition: uart_sci.h:352
UART_Handle UART_getHandle(uint32_t index)
Function to return a open'ed UART handle given a UART instance index.
int32_t UART_writeCancel(UART_Handle handle, UART_Transaction *trans)
Function to perform UART canceling of current write transaction.
UART global configuration array.
Definition: uart_sci.h:403
uint32_t writeMode
Definition: uart_sci.h:249
uint32_t edmaTcc
Definition: uart_sci.h:292
uint32_t writeSizeRemaining
Definition: uart_sci.h:332
void(* UART_CallbackFxn)(UART_Handle handle, UART_Transaction *transaction)
The definition of a callback function used by the UART driver when used in UART_TRANSFER_MODE_CALLBAC...
Definition: uart_sci.h:224
uint32_t dataLength
Definition: uart_sci.h:241
#define SystemP_WAIT_FOREVER
Value to use when needing a timeout of infinity or wait forver until resource is available.
Definition: SystemP.h:83
uint32_t edmaChId
Definition: uart_sci.h:294
uint8_t intrPriority
Definition: uart_sci.h:262
int32_t UART_write(UART_Handle handle, UART_Transaction *trans)
Function to perform UART write operation.
uint32_t readMode
Definition: uart_sci.h:247
#define UART_PARITY_NONE
Definition: uart_sci.h:172
void UART_close(UART_Handle handle)
Function to close a UART peripheral specified by the UART handle.
UART_Config gUartConfig[]
Externally defined driver configuration array.
void * args
Definition: uart_sci.h:213
Edma_IntrObject edmaIntrObj
Definition: uart_sci.h:304
EDMA_Handle uartEdmaHandle
Definition: uart_sci.h:381
uint32_t isOpen
Definition: uart_sci.h:357
void UART_flushTxFifo(UART_Handle handle)
Function to flush a TX FIFO of peripheral specified by the UART handle.
uint32_t transferMode
Definition: uart_sci.h:258
UART_Attrs * attrs
Definition: uart_sci.h:404
SemaphoreP_Object writeTransferSemObj
Definition: uart_sci.h:371
void * lock
Definition: uart_sci.h:359
uint32_t readCount
Definition: uart_sci.h:339
uint32_t parityType
Definition: uart_sci.h:245
uint32_t rxTimeoutCnt
Definition: uart_sci.h:343
uint32_t edmaBaseAddr
Definition: uart_sci.h:300
uint32_t writeCount
Definition: uart_sci.h:330
uint32_t readSizeRemaining
Definition: uart_sci.h:341
void UART_init(void)
This function initializes the UART module.
UART Parameters.
Definition: uart_sci.h:238
int32_t UART_readCancel(UART_Handle handle, UART_Transaction *trans)
Function to perform UART canceling of current read transaction.
uint32_t baudRate
Definition: uart_sci.h:239
UART_CallbackFxn readCallbackFxn
Definition: uart_sci.h:251
UART_EdmaParams txEdmaParams
Definition: uart_sci.h:379
uint32_t readErrorCnt
Definition: uart_sci.h:345
void * writeTransferSem
Definition: uart_sci.h:368
uint32_t status
Definition: uart_sci.h:211
UART_Object * object
Definition: uart_sci.h:406
Data structure used with UART_read() and UART_write()
Definition: uart_sci.h:201
#define UART_LEN_8
Definition: uart_sci.h:149
uint32_t intrNum
Definition: uart_sci.h:260
uint32_t inputClkFreq
Definition: uart_sci.h:280
UART_Handle UART_open(uint32_t index, const UART_Params *prms)
This function opens a given UART peripheral.
#define UART_CONFIG_MODE_INTERRUPT
Definition: uart_sci.h:187
UART_CallbackFxn writeCallbackFxn
Definition: uart_sci.h:253
Opaque Hwi object used with the Hwi APIs.
Definition: HwiP.h:93
UART driver object.
Definition: uart_sci.h:317
UART_Transaction * readTrans
Definition: uart_sci.h:350
uint32_t stopBits
Definition: uart_sci.h:243
UART EDMA Parameters.
Definition: uart_sci.h:291
void * EDMA_Handle
A handle that is returned from a EDMA_open() call.
Definition: edma/v0/edma.h:499
void * readBuf
Definition: uart_sci.h:337
uint32_t edmaInst
Definition: uart_sci.h:264
uint32_t rxEvtNum
Definition: uart_sci.h:266
static void UART_Params_init(UART_Params *prms)
Function to initialize the UART_Params struct to its defaults.
Definition: uart_sci.h:646
uint32_t gUartConfigNum
Externally defined driver configuration array size.
Opaque semaphore object used with the semaphore APIs.
Definition: SemaphoreP.h:59
int32_t UART_read(UART_Handle handle, UART_Transaction *trans)
Function to perform UART read operation.
UART instance attributes - used during init time.
Definition: uart_sci.h:274
uint32_t txEvtNum
Definition: uart_sci.h:268
uint32_t isIntEnabled
Definition: uart_sci.h:302
uint32_t baseAddr
Definition: uart_sci.h:278
uint32_t edmaRegionId
Definition: uart_sci.h:298
void * buf
Definition: uart_sci.h:202
HwiP_Object hwiObj
Definition: uart_sci.h:375
UART_Params prms
Definition: uart_sci.h:323
uint32_t count
Definition: uart_sci.h:205