UART_LCR_EVEN=1<<4,/* Even parity format. There will always be an even number of 1s in the binary representation (PAR = 1) */
UART_LCR_SET_P=1<<5,/* Set (force) parity to value in LCR[4] */
UART_LCR_SET_B=1<<6,/* Set BREAK condition -- Transmitter sends all zeroes to indicate BREAK */
UART_LCR_DLAB=1<<7,/* Divisor Latch Access Bit (set to allow programming of the DLH, DLM Divisors) */
};
/* 36.3.3 UART_IIR_FCR_0 */
enumUartFifoControl{
UART_FCR_FCR_EN_FIFO=1<<0,/* Enable the transmit and receive FIFOs. This bit should be enabled */
UART_FCR_RX_CLR=1<<1,/* Clears the contents of the receive FIFO and resets its counter logic to 0 (the receive shift register is not cleared or altered). This bit returns to 0 after clearing the FIFOs */
UART_FCR_TX_CLR=1<<2,/* Clears the contents of the transmit FIFO and resets its counter logic to 0 (the transmit shift register is not cleared or altered). This bit returns to 0 after clearing the FIFOs */
/* DMA:
0=DMA_MODE_0
1=DMA_MODE_1
*/
UART_FCR_DMA=1<<3,
/* TX_TRIG
0=FIFO_COUNT_GREATER_16
1=FIFO_COUNT_GREATER_8
2=FIFO_COUNT_GREATER_4
3=FIFO_COUNT_GREATER_1
*/
UART_FCR_TX_TRIG=3<<4,
UART_FCR_TX_TRIG_FIFO_COUNT_GREATER_16=0<<4,
UART_FCR_TX_TRIG_FIFO_COUNT_GREATER_8=1<<4,
UART_FCR_TX_TRIG_FIFO_COUNT_GREATER_4=2<<4,
UART_FCR_TX_TRIG_FIFO_COUNT_GREATER_1=3<<4,
/* RX_TRIG
0=FIFO_COUNT_GREATER_1
1=FIFO_COUNT_GREATER_4
2=FIFO_COUNT_GREATER_8
3=FIFO_COUNT_GREATER_16
*/
UART_FCR_RX_TRIG=3<<6,
UART_FCR_RX_TRIG_FIFO_COUNT_GREATER_1=0<<6,
UART_FCR_RX_TRIG_FIFO_COUNT_GREATER_4=1<<6,
UART_FCR_RX_TRIG_FIFO_COUNT_GREATER_8=2<<6,
UART_FCR_RX_TRIG_FIFO_COUNT_GREATER_16=3<<6,
};
/* 36.3.2 UART_IER_DLAB_0_0 */
enumUartInterruptEnable{
UART_IER_IE_RHR=1<<0,/* Interrupt enable for Received Data Interrupt */
UART_IER_IE_THR=1<<1,/* Interrupt enable for Transmitter Holding Register Empty interrupt */
UART_IER_IE_RXS=1<<2,/* Interrupt enable for Receiver Line Status Interrupt */
UART_IER_IE_MSI=1<<3,/* Interrupt enable for Modem Status Interrupt */
UART_IER_IE_RX_TIMEOUT=1<<4,/* Interrupt enable for RX FIFO timeout */
UART_IER_IE_EORD=1<<5,/* Interrupt enable for Interrupt Enable for End of Received Data */
};
/* 36.3.3 UART_IIR_FCR_0 */
enumUartInterruptIdentification{
UART_IIR_IS_STA=1<<0,/* Interrupt Pending if ZERO */
UART_IIR_IS_PRI0=1<<1,/* Encoded Interrupt ID Refer to IIR[3:0] table [36.3.3] */
UART_IIR_IS_PRI1=1<<2,/* Encoded Interrupt ID Refer to IIR[3:0] table */
UART_IIR_IS_PRI2=1<<3,/* Encoded Interrupt ID Refer to IIR[3:0] table */