uc-sdk
|
Contains all macro definitions and function prototypes support for UART firmware library on LPC17xx. More...
Go to the source code of this file.
Classes | |
struct | UART_AB_CFG_Type |
Auto Baudrate mode configuration type definition. More... | |
struct | UART_CFG_Type |
UART Configuration Structure definition. More... | |
struct | UART_FIFO_CFG_Type |
UART FIFO Configuration Structure definition. More... | |
struct | UART1_RS485_CTRLCFG_Type |
UART1 Full modem - RS485 Control configuration type. More... | |
Macros | |
#define | UART_BLOCKING_TIMEOUT (0xFFFFFFFFUL) |
#define | UART_ACCEPTED_BAUDRATE_ERROR (3) |
#define | UART_RBR_MASKBIT ((uint8_t)0xFF) |
#define | UART_THR_MASKBIT ((uint8_t)0xFF) |
#define | UART_LOAD_DLL(div) ((div) & 0xFF) |
#define | UART_DLL_MASKBIT ((uint8_t)0xFF) |
#define | UART_DLM_MASKBIT ((uint8_t)0xFF) |
#define | UART_LOAD_DLM(div) (((div) >> 8) & 0xFF) |
#define | UART_IER_RBRINT_EN ((uint32_t)(1<<0)) |
#define | UART_IER_THREINT_EN ((uint32_t)(1<<1)) |
#define | UART_IER_RLSINT_EN ((uint32_t)(1<<2)) |
#define | UART1_IER_MSINT_EN ((uint32_t)(1<<3)) |
#define | UART1_IER_CTSINT_EN ((uint32_t)(1<<7)) |
#define | UART_IER_ABEOINT_EN ((uint32_t)(1<<8)) |
#define | UART_IER_ABTOINT_EN ((uint32_t)(1<<9)) |
#define | UART_IER_BITMASK ((uint32_t)(0x307)) |
#define | UART1_IER_BITMASK ((uint32_t)(0x38F)) |
#define | UART_IIR_INTSTAT_PEND ((uint32_t)(1<<0)) |
#define | UART_IIR_INTID_RLS ((uint32_t)(3<<1)) |
#define | UART_IIR_INTID_RDA ((uint32_t)(2<<1)) |
#define | UART_IIR_INTID_CTI ((uint32_t)(6<<1)) |
#define | UART_IIR_INTID_THRE ((uint32_t)(1<<1)) |
#define | UART1_IIR_INTID_MODEM ((uint32_t)(0<<1)) |
#define | UART_IIR_INTID_MASK ((uint32_t)(7<<1)) |
#define | UART_IIR_FIFO_EN ((uint32_t)(3<<6)) |
#define | UART_IIR_ABEO_INT ((uint32_t)(1<<8)) |
#define | UART_IIR_ABTO_INT ((uint32_t)(1<<9)) |
#define | UART_IIR_BITMASK ((uint32_t)(0x3CF)) |
#define | UART_FCR_FIFO_EN ((uint8_t)(1<<0)) |
#define | UART_FCR_RX_RS ((uint8_t)(1<<1)) |
#define | UART_FCR_TX_RS ((uint8_t)(1<<2)) |
#define | UART_FCR_DMAMODE_SEL ((uint8_t)(1<<3)) |
#define | UART_FCR_TRG_LEV0 ((uint8_t)(0)) |
#define | UART_FCR_TRG_LEV1 ((uint8_t)(1<<6)) |
#define | UART_FCR_TRG_LEV2 ((uint8_t)(2<<6)) |
#define | UART_FCR_TRG_LEV3 ((uint8_t)(3<<6)) |
#define | UART_FCR_BITMASK ((uint8_t)(0xCF)) |
#define | UART_TX_FIFO_SIZE (16) |
#define | UART_LCR_WLEN5 ((uint8_t)(0)) |
#define | UART_LCR_WLEN6 ((uint8_t)(1<<0)) |
#define | UART_LCR_WLEN7 ((uint8_t)(2<<0)) |
#define | UART_LCR_WLEN8 ((uint8_t)(3<<0)) |
#define | UART_LCR_STOPBIT_SEL ((uint8_t)(1<<2)) |
#define | UART_LCR_PARITY_EN ((uint8_t)(1<<3)) |
#define | UART_LCR_PARITY_ODD ((uint8_t)(0)) |
#define | UART_LCR_PARITY_EVEN ((uint8_t)(1<<4)) |
#define | UART_LCR_PARITY_F_1 ((uint8_t)(2<<4)) |
#define | UART_LCR_PARITY_F_0 ((uint8_t)(3<<4)) |
#define | UART_LCR_BREAK_EN ((uint8_t)(1<<6)) |
#define | UART_LCR_DLAB_EN ((uint8_t)(1<<7)) |
#define | UART_LCR_BITMASK ((uint8_t)(0xFF)) |
#define | UART1_MCR_DTR_CTRL ((uint8_t)(1<<0)) |
#define | UART1_MCR_RTS_CTRL ((uint8_t)(1<<1)) |
#define | UART1_MCR_LOOPB_EN ((uint8_t)(1<<4)) |
#define | UART1_MCR_AUTO_RTS_EN ((uint8_t)(1<<6)) |
#define | UART1_MCR_AUTO_CTS_EN ((uint8_t)(1<<7)) |
#define | UART1_MCR_BITMASK ((uint8_t)(0x0F3)) |
#define | UART_LSR_RDR ((uint8_t)(1<<0)) |
#define | UART_LSR_OE ((uint8_t)(1<<1)) |
#define | UART_LSR_PE ((uint8_t)(1<<2)) |
#define | UART_LSR_FE ((uint8_t)(1<<3)) |
#define | UART_LSR_BI ((uint8_t)(1<<4)) |
#define | UART_LSR_THRE ((uint8_t)(1<<5)) |
#define | UART_LSR_TEMT ((uint8_t)(1<<6)) |
#define | UART_LSR_RXFE ((uint8_t)(1<<7)) |
#define | UART_LSR_BITMASK ((uint8_t)(0xFF)) |
#define | UART1_MSR_DELTA_CTS ((uint8_t)(1<<0)) |
#define | UART1_MSR_DELTA_DSR ((uint8_t)(1<<1)) |
#define | UART1_MSR_LO2HI_RI ((uint8_t)(1<<2)) |
#define | UART1_MSR_DELTA_DCD ((uint8_t)(1<<3)) |
#define | UART1_MSR_CTS ((uint8_t)(1<<4)) |
#define | UART1_MSR_DSR ((uint8_t)(1<<5)) |
#define | UART1_MSR_RI ((uint8_t)(1<<6)) |
#define | UART1_MSR_DCD ((uint8_t)(1<<7)) |
#define | UART1_MSR_BITMASK ((uint8_t)(0xFF)) |
#define | UART_SCR_BIMASK ((uint8_t)(0xFF)) |
#define | UART_ACR_START ((uint32_t)(1<<0)) |
#define | UART_ACR_MODE ((uint32_t)(1<<1)) |
#define | UART_ACR_AUTO_RESTART ((uint32_t)(1<<2)) |
#define | UART_ACR_ABEOINT_CLR ((uint32_t)(1<<8)) |
#define | UART_ACR_ABTOINT_CLR ((uint32_t)(1<<9)) |
#define | UART_ACR_BITMASK ((uint32_t)(0x307)) |
#define | UART_ICR_IRDAEN ((uint32_t)(1<<0)) |
#define | UART_ICR_IRDAINV ((uint32_t)(1<<1)) |
#define | UART_ICR_FIXPULSE_EN ((uint32_t)(1<<2)) |
#define | UART_ICR_PULSEDIV(n) ((uint32_t)((n&0x07)<<3)) |
#define | UART_ICR_BITMASK ((uint32_t)(0x3F)) |
#define | UART_FDR_DIVADDVAL(n) ((uint32_t)(n&0x0F)) |
#define | UART_FDR_MULVAL(n) ((uint32_t)((n<<4)&0xF0)) |
#define | UART_FDR_BITMASK ((uint32_t)(0xFF)) |
#define | UART_TER_TXEN ((uint8_t)(1<<7)) |
#define | UART_TER_BITMASK ((uint8_t)(0x80)) |
#define | UART1_RS485CTRL_NMM_EN ((uint32_t)(1<<0)) |
#define | UART1_RS485CTRL_RX_DIS ((uint32_t)(1<<1)) |
#define | UART1_RS485CTRL_AADEN ((uint32_t)(1<<2)) |
#define | UART1_RS485CTRL_SEL_DTR ((uint32_t)(1<<3)) |
#define | UART1_RS485CTRL_DCTRL_EN ((uint32_t)(1<<4)) |
#define | UART1_RS485CTRL_OINV_1 ((uint32_t)(1<<5)) |
#define | UART1_RS485CTRL_BITMASK ((uint32_t)(0x3F)) |
#define | UART1_RS485ADRMATCH_BITMASK ((uint8_t)(0xFF)) |
#define | UART1_RS485DLY_BITMASK ((uint8_t)(0xFF)) /** Bit mask value */ |
#define | UART_FIFOLVL_RXFIFOLVL(n) ((uint32_t)(n&0x0F)) |
#define | UART_FIFOLVL_TXFIFOLVL(n) ((uint32_t)((n>>8)&0x0F)) |
#define | UART_FIFOLVL_BITMASK ((uint32_t)(0x0F0F)) |
#define | PARAM_UART_DATABIT(databit) |
#define | PARAM_UART_STOPBIT(stopbit) ((stopbit==UART_STOPBIT_1) || (stopbit==UART_STOPBIT_2)) |
#define | PARAM_UART_PARITY(parity) |
#define | PARAM_UART_FIFO_LEVEL(fifo) |
#define | PARAM_UART_INTCFG(IntCfg) |
#define | PARAM_UART1_INTCFG(IntCfg) ((IntCfg==UART1_INTCFG_MS) || (IntCfg==UART1_INTCFG_CTS)) |
#define | PARAM_UART_AUTOBAUD_MODE(ABmode) ((ABmode==UART_AUTOBAUD_MODE0) || (ABmode==UART_AUTOBAUD_MODE1)) |
#define | PARAM_UART_AUTOBAUD_INTSTAT(ABIntStat) |
#define | PARAM_UART_IrDA_PULSEDIV(PulseDiv) |
#define | PARAM_UART1_SIGNALSTATE(x) ((x==INACTIVE) || (x==ACTIVE)) |
#define | PARAM_UART1_MODEM_PIN(x) ((x==UART1_MODEM_PIN_DTR) || (x==UART1_MODEM_PIN_RTS)) |
#define | PARAM_UART1_MODEM_MODE(x) |
#define | PARAM_UART_RS485_DIRCTRL_PIN(x) ((x==UART1_RS485_DIRCTRL_RTS) || (x==UART1_RS485_DIRCTRL_DTR)) |
#define | PARAM_UARTx(x) |
#define | PARAM_UART_IrDA(x) (((uint32_t *)x)==((uint32_t *)LPC_UART3)) |
#define | PARAM_UART1_MODEM(x) (((uint32_t *)x)==((uint32_t *)LPC_UART1)) |
#define | PARAM_UART1_RS485_CFG_MATCHADDRVALUE(x) ((x<0xFF)) |
#define | PARAM_UART1_RS485_CFG_DELAYVALUE(x) ((x<0xFF)) |
Contains all macro definitions and function prototypes support for UART firmware library on LPC17xx.
Software that is described herein is for illustrative purposes only which provides customers with programming information regarding the products. This software is supplied "AS IS" without any warranties. NXP Semiconductors assumes no responsibility or liability for the use of the software, conveys no license or title under any patent, copyright, or mask work right to the product. NXP Semiconductors reserves the right to make changes in the software without notification. NXP Semiconductors also make no representation or warranty that such application will be suitable for the specified use without further testing or modification.
Definition in file lpc17xx_uart.h.