![]() |
LPCOpen Platform
v1.03
LPCOpen Platform for NXP LPC Microcontrollers
|
This driver provides UART support for the device. The driver requires the following IP drivers:
IP: USART2 register block and driver
Functions | |
| STATIC INLINE void | Chip_UART_ConfigData (LPC_USART_T *pUART, IP_UART_002_DATALEN_T Databits, IP_UART_002_PARITY_T Parity, IP_UART_002_STOPLEN_T Stopbits) |
| Configure the UART protocol. | |
| STATIC INLINE void | Chip_UART_IntEnable (LPC_USART_T *pUART, uint32_t UARTIntCfg, FunctionalState NewState) |
| Enable/Disable UART Interrupts. | |
| STATIC INLINE uint32_t | Chip_UART_GetIntStatus (LPC_USART_T *pUART) |
| Get UART interrupt status. | |
| void | Chip_UART_Init (LPC_USART_T *pUART) |
| Initialize the UART peripheral. | |
| void | Chip_UART_SetBaudRate (LPC_USART_T *pUART, uint32_t baudrate) |
| Set baud rate for UART. | |
| Status | Chip_UART_SendByte (LPC_USART_T *pUART, uint8_t data) |
| Transmit a 8 bits data. | |
| Status | Chip_UART_ReceiveByte (LPC_USART_T *pUART, uint8_t *Data) |
| Receive a 8 bits data. | |
| STATIC INLINE void Chip_UART_ConfigData | ( | LPC_USART_T * | pUART, |
| IP_UART_002_DATALEN_T | Databits, | ||
| IP_UART_002_PARITY_T | Parity, | ||
| IP_UART_002_STOPLEN_T | Stopbits | ||
| ) |
Configure the UART protocol.
| pUART | : The base of UART peripheral on the chip |
| Databits,: | Data size for the USART |
| Parity | : Parity to be used by the USART |
| Stopbits,: | Number of stop bits appended to transmitted data |
Definition at line 55 of file uart_8xx.h.
| STATIC INLINE uint32_t Chip_UART_GetIntStatus | ( | LPC_USART_T * | pUART | ) |
Get UART interrupt status.
Get Interrupt Stream Status.
| pUART | : The base of UART peripheral on the chip |
Definition at line 81 of file uart_8xx.h.
| void Chip_UART_Init | ( | LPC_USART_T * | pUART | ) |
Initialize the UART peripheral.
| pUART | : The base of UART peripheral on the chip |
Initialize the UART peripheral.
| pUART | : Pointer to selected pUART peripheral |
Definition at line 54 of file uart_11xx.c.
| STATIC INLINE void Chip_UART_IntEnable | ( | LPC_USART_T * | pUART, |
| uint32_t | UARTIntCfg, | ||
| FunctionalState | NewState | ||
| ) |
Enable/Disable UART Interrupts.
| pUART | : The base of UART peripheral on the chip |
| UARTIntCfg | : Specifies the interrupt flag |
| NewState | : New state, ENABLE or DISABLE |
Definition at line 69 of file uart_8xx.h.
| Status Chip_UART_ReceiveByte | ( | LPC_USART_T * | pUART, |
| uint8_t * | Data | ||
| ) |
Receive a 8 bits data.
| pUART | : The base of UART peripheral on the chip |
| Data | : 8 bits data received |
Receive a 8 bits data.
| pUART | : Pointer to selected pUART peripheral |
| Data | : Pointer to Data to receive (must be 8-bit long) |
Receive a 8 bits data.
| pUART | : Pointer to selected pUART peripheral |
| *Data | : Pointer to Data to receive (must be 8-bit long) |
Definition at line 205 of file uart_17xx_40xx.h.
| Status Chip_UART_SendByte | ( | LPC_USART_T * | pUART, |
| uint8_t | data | ||
| ) |
Transmit a 8 bits data.
| pUART | : The base of UART peripheral on the chip |
| data | : 8 bits data to be sent |
Transmit a 8 bits data.
| pUART | : Pointer to selected UART peripheral |
| data | : Byte to transmit |
Transmit a 8 bits data.
| pUART | : Pointer to selected pUART peripheral |
| data | : Data to transmit (must be 8-bit long) |
Definition at line 86 of file uart_11xx.h.
| void Chip_UART_SetBaudRate | ( | LPC_USART_T * | pUART, |
| uint32_t | baudrate | ||
| ) |
Set baud rate for UART.
| pUART | : The base of UART peripheral on the chip |
| baudrate,: | Baud rate to be set |
Definition at line 61 of file uart_8xx.c.