![]() |
LPCOpen Platform
v1.03
LPCOpen Platform for NXP LPC Microcontrollers
|
Functions | |
| STATIC INLINE void | Chip_UART_ConfigData (LPC_USART_T *pUART, IP_UART_DATABIT_T Databits, IP_UART_PARITY_T Parity, IP_UART_STOPBIT_T Stopbits) |
| Configure data width, parity mode and stop bits. | |
| STATIC INLINE uint32_t | Chip_UART_Send (LPC_USART_T *pUART, uint8_t *txbuf, uint32_t buflen, TRANSFER_BLOCK_T flag) |
| Send a block of data via UART peripheral. | |
| STATIC INLINE uint32_t | Chip_UART_Receive (LPC_USART_T *pUART, uint8_t *rxbuf, uint32_t buflen, TRANSFER_BLOCK_T flag) |
| Receive a block of data via UART peripheral. | |
| STATIC INLINE void | Chip_UART_FIFOConfig (LPC_USART_T *pUART, UART_FIFO_CFG_T *FIFOCfg) |
| Configure FIFO function on selected UART peripheral. | |
| STATIC INLINE void | Chip_UART_FIFOConfigStructInit (LPC_USART_T *pUART, UART_FIFO_CFG_T *UART_FIFOInitStruct) |
| Fills each UART_FIFOInitStruct member with its default value: | |
| STATIC INLINE void | Chip_UART_IntConfig (LPC_USART_T *pUART, IP_UART_INT_T UARTIntCfg, FunctionalState NewState) |
| Enable or disable specified UART interrupt. | |
| STATIC INLINE uint32_t | Chip_UART_IntGetStatus (LPC_USART_T *pUART) |
| Get Source Interrupt. | |
| STATIC INLINE uint8_t | Chip_UART_GetLineStatus (LPC_USART_T *pUART) |
| Get current value of Line Status register in UART peripheral. | |
| STATIC INLINE FlagStatus | Chip_UART_CheckBusy (LPC_USART_T *pUART) |
| Check whether if UART is busy or not. | |
| STATIC INLINE void | Chip_UART_ForceBreak (LPC_USART_T *pUART) |
| Force BREAK character on UART line, output pin pUART TXD is forced to logic 0. | |
| STATIC INLINE Status | Chip_UART_SendByte (LPC_USART_T *pUART, uint8_t data) |
| Transmit a single data through UART peripheral. | |
| STATIC INLINE Status | Chip_UART_ReceiveByte (LPC_USART_T *pUART, uint8_t *Data) |
| Receive a single data from UART peripheral. | |
| STATIC INLINE void | Chip_UART_ABCmd (LPC_USART_T *pUART, UART_AB_CFG_T *ABConfigStruct, FunctionalState NewState) |
| Start/Stop Auto Baudrate activity. | |
| STATIC INLINE void | Chip_UART_ABClearIntPending (LPC_USART_T *pUART, IP_UART_INT_STATUS_T ABIntType) |
| Clear Autobaud Interrupt. | |
| void | Chip_UART_Init (LPC_USART_T *pUART) |
| Initializes the pUART peripheral. | |
| void | Chip_UART_DeInit (LPC_USART_T *pUART) |
| De-initializes the pUART peripheral. | |
| Status | Chip_UART_SetBaud (LPC_USART_T *pUART, uint32_t baudrate) |
| Determines best dividers to get a target baud rate. | |
| void | Chip_UART_TxCmd (LPC_USART_T *pUART, FunctionalState NewState) |
| Enable/Disable transmission on UART TxD pin. | |
| IP_UART_INT_STATUS_T | Chip_UART_GetIntStatus (LPC_USART_T *pUART) |
| Get Interrupt Stream Status. | |
| void | Chip_UART_Interrupt_Handler (LPC_USART_T *pUART) |
| Uart interrupt service routine (chip layer) | |
| uint32_t | Chip_UART_Interrupt_Transmit (LPC_USART_T *pUART, uint8_t *txbuf, uint8_t buflen) |
| UART transmit function for interrupt mode (using ring buffers) | |
| uint32_t | Chip_UART_Interrupt_Receive (LPC_USART_T *pUART, uint8_t *rxbuf, uint8_t buflen) |
| UART read function for interrupt mode (using ring buffers) | |
| void | Chip_UART_InitRingBuffer (LPC_USART_T *pUART) |
| Reset Tx and Rx ring buffer (head and tail) | |
| FlagStatus | Chip_UART_GetABEOStatus (LPC_USART_T *pUART) |
| STATIC INLINE void Chip_UART_ABClearIntPending | ( | LPC_USART_T * | pUART, |
| IP_UART_INT_STATUS_T | ABIntType | ||
| ) |
Clear Autobaud Interrupt.
| pUART | : Pointer to selected pUART peripheral |
| ABIntType | : type of auto-baud interrupt, should be:
|
Definition at line 232 of file uart_17xx_40xx.h.
| STATIC INLINE void Chip_UART_ABCmd | ( | LPC_USART_T * | pUART, |
| UART_AB_CFG_T * | ABConfigStruct, | ||
| FunctionalState | NewState | ||
| ) |
Start/Stop Auto Baudrate activity.
| pUART | : Pointer to selected pUART peripheral |
| ABConfigStruct | : A pointer to UART_AB_CFG_T structure that contains specified information about UAR auto baud configuration |
| NewState | : New State of Auto baudrate activity, should be ENABLE or DISABLE |
Definition at line 219 of file uart_17xx_40xx.h.
| STATIC INLINE FlagStatus Chip_UART_CheckBusy | ( | LPC_USART_T * | pUART | ) |
Check whether if UART is busy or not.
| pUART | : Pointer to selected pUART peripheral |
Definition at line 173 of file uart_17xx_40xx.h.
| STATIC INLINE void Chip_UART_ConfigData | ( | LPC_USART_T * | pUART, |
| IP_UART_DATABIT_T | Databits, | ||
| IP_UART_PARITY_T | Parity, | ||
| IP_UART_STOPBIT_T | Stopbits | ||
| ) |
Configure data width, parity mode and stop bits.
| pUART | : Pointer to selected pUART peripheral |
| Databits | : UART Data width, should be: UART_DATABIT_5: UART 5 bit data mode UART_DATABIT_6: UART 6 bit data mode UART_DATABIT_7: UART 7 bit data mode UART_DATABIT_8: UART 8 bit data mode |
| Parity | : UART Parity mode, should be: UART_PARITY_NONE: No parity UART_PARITY_ODD: Odd parity UART_PARITY_EVEN: Even parity UART_PARITY_SP_1: Forced "1" stick parity UART_PARITY_SP_0: Forced "0" stick parity |
| Stopbits | : Number of stop bits, should be: UART_STOPBIT_1: One Stop Bit Select UART_STOPBIT_2: Two Stop Bits Select |
Definition at line 63 of file uart_17xx_40xx.h.
| void Chip_UART_DeInit | ( | LPC_USART_T * | pUART | ) |
De-initializes the pUART peripheral.
| pUART | : Pointer to selected pUART peripheral |
Definition at line 64 of file uart_11xx.c.
| STATIC INLINE void Chip_UART_FIFOConfig | ( | LPC_USART_T * | pUART, |
| UART_FIFO_CFG_T * | FIFOCfg | ||
| ) |
Configure FIFO function on selected UART peripheral.
| pUART | : Pointer to selected pUART peripheral |
| FIFOCfg | : Pointer to a UART_FIFO_CFG_T Structure that contains specified information about FIFO configuration |
Definition at line 107 of file uart_17xx_40xx.h.
| STATIC INLINE void Chip_UART_FIFOConfigStructInit | ( | LPC_USART_T * | pUART, |
| UART_FIFO_CFG_T * | UART_FIFOInitStruct | ||
| ) |
Fills each UART_FIFOInitStruct member with its default value:
| pUART | : Pointer to selected UART peripheral |
| UART_FIFOInitStruct | : Pointer to a UART_FIFO_CFG_T structure which will be initialized. |
Definition at line 123 of file uart_17xx_40xx.h.
| STATIC INLINE void Chip_UART_ForceBreak | ( | LPC_USART_T * | pUART | ) |
Force BREAK character on UART line, output pin pUART TXD is forced to logic 0.
| pUART | : Pointer to selected pUART peripheral |
Definition at line 183 of file uart_17xx_40xx.h.
| FlagStatus Chip_UART_GetABEOStatus | ( | LPC_USART_T * | pUART | ) |
Definition at line 415 of file uart_17xx_40xx.c.
| IP_UART_INT_STATUS_T Chip_UART_GetIntStatus | ( | LPC_USART_T * | pUART | ) |
Get Interrupt Stream Status.
| pUART | : Pointer to selected pUART peripheral |
Get Interrupt Stream Status.
| pUART | : The base of UART peripheral on the chip |
Definition at line 164 of file uart_17xx_40xx.c.
| STATIC INLINE uint8_t Chip_UART_GetLineStatus | ( | LPC_USART_T * | pUART | ) |
Get current value of Line Status register in UART peripheral.
| pUART | : Pointer to selected pUART peripheral |
Definition at line 163 of file uart_17xx_40xx.h.
| void Chip_UART_Init | ( | LPC_USART_T * | pUART | ) |
Initializes the pUART peripheral.
| pUART | : Pointer to selected pUART peripheral |
Definition at line 54 of file uart_11xx.c.
| void Chip_UART_InitRingBuffer | ( | LPC_USART_T * | pUART | ) |
Reset Tx and Rx ring buffer (head and tail)
| pUART | : Pointer to selected UART peripheral |
Definition at line 401 of file uart_17xx_40xx.c.
| STATIC INLINE void Chip_UART_IntConfig | ( | LPC_USART_T * | pUART, |
| IP_UART_INT_T | UARTIntCfg, | ||
| FunctionalState | NewState | ||
| ) |
Enable or disable specified UART interrupt.
| pUART | : Pointer to selected pUART peripheral |
| UARTIntCfg | : Specifies the interrupt flag, should be one of the following:
|
| NewState | : New state of specified UART interrupt type, should be ENALBE or DISALBE |
Definition at line 143 of file uart_17xx_40xx.h.
| void Chip_UART_Interrupt_Handler | ( | LPC_USART_T * | pUART | ) |
Uart interrupt service routine (chip layer)
| pUART | : Pointer to selected pUART peripheral |
Definition at line 207 of file uart_17xx_40xx.c.
| uint32_t Chip_UART_Interrupt_Receive | ( | LPC_USART_T * | pUART, |
| uint8_t * | rxbuf, | ||
| uint8_t | buflen | ||
| ) |
UART read function for interrupt mode (using ring buffers)
| pUART | : Selected UART peripheral used to send data, should be UART0 |
| rxbuf | : Pointer to Received buffer |
| buflen | : Length of Received buffer |
Definition at line 369 of file uart_17xx_40xx.c.
| uint32_t Chip_UART_Interrupt_Transmit | ( | LPC_USART_T * | pUART, |
| uint8_t * | txbuf, | ||
| uint8_t | buflen | ||
| ) |
UART transmit function for interrupt mode (using ring buffers)
| pUART | : Selected UART peripheral used to send data, should be UART0 |
| txbuf | : Pointer to Transmit buffer |
| buflen | : Length of Transmit buffer |
Definition at line 294 of file uart_17xx_40xx.c.
| STATIC INLINE uint32_t Chip_UART_IntGetStatus | ( | LPC_USART_T * | pUART | ) |
Get Source Interrupt.
| pUART | : Pointer to selected pUART peripheral |
Definition at line 153 of file uart_17xx_40xx.h.
| STATIC INLINE uint32_t Chip_UART_Receive | ( | LPC_USART_T * | pUART, |
| uint8_t * | rxbuf, | ||
| uint32_t | buflen, | ||
| TRANSFER_BLOCK_T | flag | ||
| ) |
Receive a block of data via UART peripheral.
| pUART | : Pointer to selected pUART peripheral |
| rxbuf | : Pointer to Received buffer |
| buflen | : Length of Received buffer |
| flag | : Flag mode, should be NONE_BLOCKING or BLOCKING |
Definition at line 92 of file uart_17xx_40xx.h.
| STATIC INLINE Status Chip_UART_ReceiveByte | ( | LPC_USART_T * | pUART, |
| uint8_t * | Data | ||
| ) |
Receive a single data from UART peripheral.
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.
| STATIC INLINE uint32_t Chip_UART_Send | ( | LPC_USART_T * | pUART, |
| uint8_t * | txbuf, | ||
| uint32_t | buflen, | ||
| TRANSFER_BLOCK_T | flag | ||
| ) |
Send a block of data via UART peripheral.
| pUART | : Pointer to selected pUART peripheral |
| txbuf | : Pointer to Transmit buffer |
| buflen | : Length of Transmit buffer |
| flag | : Flag used in UART transfer, should be NONE_BLOCKING or BLOCKING |
Definition at line 79 of file uart_17xx_40xx.h.
| STATIC INLINE Status Chip_UART_SendByte | ( | LPC_USART_T * | pUART, |
| uint8_t | data | ||
| ) |
Transmit a single data through UART peripheral.
Transmit a 8 bits data.
| pUART | : Pointer to selected pUART peripheral |
| data | : Data to transmit (must be 8-bit long) |
Definition at line 194 of file uart_17xx_40xx.h.
| Status Chip_UART_SetBaud | ( | LPC_USART_T * | pUART, |
| uint32_t | baudrate | ||
| ) |
Determines best dividers to get a target baud rate.
| pUART | : Pointer to selected pUART peripheral |
| baudrate | : Desired UART baud rate. |
Determines best dividers to get a target baud rate.
| pUART | : Pointer to selected UART peripheral |
| baudrate | : Target baud rate (baud rate = bit rate) |
Definition at line 139 of file uart_11xx.c.
| void Chip_UART_TxCmd | ( | LPC_USART_T * | pUART, |
| FunctionalState | NewState | ||
| ) |
Enable/Disable transmission on UART TxD pin.
| pUART | : Pointer to selected pUART peripheral |
| NewState | : New State of Tx transmission function, should be ENABLE or DISABLE |
Definition at line 156 of file uart_17xx_40xx.c.