38 #ifndef __DRIVERLIB_UART_H__ 39 #define __DRIVERLIB_UART_H__ 61 #define UART_INT_DMATX 0x20000 // DMA TX interrupt 62 #define UART_INT_DMARX 0x10000 // DMA RX interrupt 63 #define UART_INT_9BIT 0x1000 // 9-bit address match interrupt 64 #define UART_INT_OE 0x400 // Overrun Error Interrupt Mask 65 #define UART_INT_BE 0x200 // Break Error Interrupt Mask 66 #define UART_INT_PE 0x100 // Parity Error Interrupt Mask 67 #define UART_INT_FE 0x080 // Framing Error Interrupt Mask 68 #define UART_INT_RT 0x040 // Receive Timeout Interrupt Mask 69 #define UART_INT_TX 0x020 // Transmit Interrupt Mask 70 #define UART_INT_RX 0x010 // Receive Interrupt Mask 71 #define UART_INT_DSR 0x008 // DSR Modem Interrupt Mask 72 #define UART_INT_DCD 0x004 // DCD Modem Interrupt Mask 73 #define UART_INT_CTS 0x002 // CTS Modem Interrupt Mask 74 #define UART_INT_RI 0x001 // RI Modem Interrupt Mask 85 #define UART_CONFIG_WLEN_MASK 0x00000060 // Mask for extracting word length 86 #define UART_CONFIG_WLEN_8 0x00000060 // 8 bit data 87 #define UART_CONFIG_WLEN_7 0x00000040 // 7 bit data 88 #define UART_CONFIG_WLEN_6 0x00000020 // 6 bit data 89 #define UART_CONFIG_WLEN_5 0x00000000 // 5 bit data 90 #define UART_CONFIG_STOP_MASK 0x00000008 // Mask for extracting stop bits 91 #define UART_CONFIG_STOP_ONE 0x00000000 // One stop bit 92 #define UART_CONFIG_STOP_TWO 0x00000008 // Two stop bits 93 #define UART_CONFIG_PAR_MASK 0x00000086 // Mask for extracting parity 94 #define UART_CONFIG_PAR_NONE 0x00000000 // No parity 95 #define UART_CONFIG_PAR_EVEN 0x00000006 // Even parity 96 #define UART_CONFIG_PAR_ODD 0x00000002 // Odd parity 97 #define UART_CONFIG_PAR_ONE 0x00000082 // Parity bit is one 98 #define UART_CONFIG_PAR_ZERO 0x00000086 // Parity bit is zero 106 #define UART_FIFO_TX1_8 0x00000000 // Transmit interrupt at 1/8 Full 107 #define UART_FIFO_TX2_8 0x00000001 // Transmit interrupt at 1/4 Full 108 #define UART_FIFO_TX4_8 0x00000002 // Transmit interrupt at 1/2 Full 109 #define UART_FIFO_TX6_8 0x00000003 // Transmit interrupt at 3/4 Full 110 #define UART_FIFO_TX7_8 0x00000004 // Transmit interrupt at 7/8 Full 118 #define UART_FIFO_RX1_8 0x00000000 // Receive interrupt at 1/8 Full 119 #define UART_FIFO_RX2_8 0x00000008 // Receive interrupt at 1/4 Full 120 #define UART_FIFO_RX4_8 0x00000010 // Receive interrupt at 1/2 Full 121 #define UART_FIFO_RX6_8 0x00000018 // Receive interrupt at 3/4 Full 122 #define UART_FIFO_RX7_8 0x00000020 // Receive interrupt at 7/8 Full 129 #define UART_DMA_ERR_RXSTOP 0x00000004 // Stop DMA receive if UART error 130 #define UART_DMA_TX 0x00000002 // Enable DMA for transmit 131 #define UART_DMA_RX 0x00000001 // Enable DMA for receive 138 #define UART_RXERROR_OVERRUN 0x00000008 139 #define UART_RXERROR_BREAK 0x00000004 140 #define UART_RXERROR_PARITY 0x00000002 141 #define UART_RXERROR_FRAMING 0x00000001 149 #define UART_OUTPUT_RTS 0x00000800 150 #define UART_OUTPUT_DTR 0x00000400 157 #define UART_INPUT_RI 0x00000100 158 #define UART_INPUT_DCD 0x00000004 159 #define UART_INPUT_DSR 0x00000002 160 #define UART_INPUT_CTS 0x00000001 168 #define UART_FLOWCONTROL_TX 0x00008000 169 #define UART_FLOWCONTROL_RX 0x00004000 170 #define UART_FLOWCONTROL_NONE 0x00000000 178 #define UART_TXINT_MODE_FIFO 0x00000000 179 #define UART_TXINT_MODE_EOT 0x00000010 187 #define UART_CLOCK_SYSTEM 0x00000000 188 #define UART_CLOCK_ALTCLK 0x00000005 198 uint32_t ui32RxLevel);
200 uint32_t *pui32RxLevel);
202 uint32_t ui32Baud, uint32_t ui32Config);
204 uint32_t *pui32Baud, uint32_t *pui32Config);
209 extern void UARTEnableSIR(uint32_t ui32Base,
bool bLowPower);
216 extern void UARTCharPut(uint32_t ui32Base,
unsigned char ucData);
217 extern void UARTBreakCtl(uint32_t ui32Base,
bool bBreakState);
218 extern bool UARTBusy(uint32_t ui32Base);
219 extern void UARTIntRegister(uint32_t ui32Base,
void (*pfnHandler)(
void));
221 extern void UARTIntEnable(uint32_t ui32Base, uint32_t ui32IntFlags);
222 extern void UARTIntDisable(uint32_t ui32Base, uint32_t ui32IntFlags);
223 extern uint32_t
UARTIntStatus(uint32_t ui32Base,
bool bMasked);
224 extern void UARTIntClear(uint32_t ui32Base, uint32_t ui32IntFlags);
225 extern void UARTDMAEnable(uint32_t ui32Base, uint32_t ui32DMAFlags);
226 extern void UARTDMADisable(uint32_t ui32Base, uint32_t ui32DMAFlags);
257 #endif // __DRIVERLIB_UART_H__ void UARTModemControlClear(uint32_t ui32Base, uint32_t ui32Control)
Definition: uart.c:798
void UARTFIFOEnable(uint32_t ui32Base)
Definition: uart.c:566
uint32_t UARTClockSourceGet(uint32_t ui32Base)
Definition: uart.c:1702
void UARTSmartCardDisable(uint32_t ui32Base)
Definition: uart.c:727
bool UARTCharsAvail(uint32_t ui32Base)
Definition: uart.c:1019
void UARTConfigSetExpClk(uint32_t ui32Base, uint32_t ui32UARTClk, uint32_t ui32Baud, uint32_t ui32Config)
Definition: uart.c:348
void UARTParityModeSet(uint32_t ui32Base, uint32_t ui32Parity)
Definition: uart.c:173
void UARTDMAEnable(uint32_t ui32Base, uint32_t ui32DMAFlags)
Definition: uart.c:1549
void UARTFIFOLevelSet(uint32_t ui32Base, uint32_t ui32TxLevel, uint32_t ui32RxLevel)
Definition: uart.c:241
void UARTIntRegister(uint32_t ui32Base, void(*pfnHandler)(void))
Definition: uart.c:1301
void UARTIntDisable(uint32_t ui32Base, uint32_t ui32IntFlags)
Definition: uart.c:1435
void UARTIntClear(uint32_t ui32Base, uint32_t ui32IntFlags)
Definition: uart.c:1513
void UARTDisable(uint32_t ui32Base)
Definition: uart.c:528
void UARTBreakCtl(uint32_t ui32Base, bool bBreakState)
Definition: uart.c:1236
void UARTModemControlSet(uint32_t ui32Base, uint32_t ui32Control)
Definition: uart.c:760
bool UARTSpaceAvail(uint32_t ui32Base)
Definition: uart.c:1046
void UARTSmartCardEnable(uint32_t ui32Base)
Definition: uart.c:687
void UARTRxErrorClear(uint32_t ui32Base)
Definition: uart.c:1640
bool UARTBusy(uint32_t ui32Base)
Definition: uart.c:1268
uint32_t UARTModemStatusGet(uint32_t ui32Base)
Definition: uart.c:858
int32_t UARTCharGetNonBlocking(uint32_t ui32Base)
Definition: uart.c:1075
void UART9BitEnable(uint32_t ui32Base)
Definition: uart.c:1727
void UARTEnableSIR(uint32_t ui32Base, bool bLowPower)
Definition: uart.c:623
void UART9BitDisable(uint32_t ui32Base)
Definition: uart.c:1752
uint32_t UARTIntStatus(uint32_t ui32Base, bool bMasked)
Definition: uart.c:1465
bool UARTCharPutNonBlocking(uint32_t ui32Base, unsigned char ucData)
Definition: uart.c:1154
void UARTClockSourceSet(uint32_t ui32Base, uint32_t ui32Source)
Definition: uart.c:1673
uint32_t UARTParityModeGet(uint32_t ui32Base)
Definition: uart.c:208
void UARTDisableSIR(uint32_t ui32Base)
Definition: uart.c:660
uint32_t UARTRxErrorGet(uint32_t ui32Base)
Definition: uart.c:1612
void UARTConfigGetExpClk(uint32_t ui32Base, uint32_t ui32UARTClk, uint32_t *pui32Baud, uint32_t *pui32Config)
Definition: uart.c:447
void UARTLoopbackEnable(uint32_t ui32Base)
Definition: uart.c:1877
int32_t UARTCharGet(uint32_t ui32Base)
Definition: uart.c:1116
void UART9BitAddrSend(uint32_t ui32Base, uint8_t ui8Addr)
Definition: uart.c:1818
uint32_t UARTFlowControlGet(uint32_t ui32Base)
Definition: uart.c:923
void UART9BitAddrSet(uint32_t ui32Base, uint8_t ui8Addr, uint8_t ui8Mask)
Definition: uart.c:1783
uint32_t UARTTxIntModeGet(uint32_t ui32Base)
Definition: uart.c:991
void UARTFIFOLevelGet(uint32_t ui32Base, uint32_t *pui32TxLevel, uint32_t *pui32RxLevel)
Definition: uart.c:284
uint32_t UARTModemControlGet(uint32_t ui32Base)
Definition: uart.c:832
void UARTEnable(uint32_t ui32Base)
Definition: uart.c:496
void UARTCharPut(uint32_t ui32Base, unsigned char ucData)
Definition: uart.c:1200
void UARTTxIntModeSet(uint32_t ui32Base, uint32_t ui32Mode)
Definition: uart.c:956
void UARTIntEnable(uint32_t ui32Base, uint32_t ui32IntFlags)
Definition: uart.c:1403
void UARTFlowControlSet(uint32_t ui32Base, uint32_t ui32Mode)
Definition: uart.c:891
void UARTIntUnregister(uint32_t ui32Base)
Definition: uart.c:1346
void UARTDMADisable(uint32_t ui32Base, uint32_t ui32DMAFlags)
Definition: uart.c:1581
void UARTFIFODisable(uint32_t ui32Base)
Definition: uart.c:591