NXP's driver library for LPC17xx, ported to mbed's online compiler. Not tested! I had to fix a lot of warings and found a couple of pretty obvious bugs, so the chances are there are more. Original: http://ics.nxp.com/support/documents/microcontrollers/zip/lpc17xx.cmsis.driver.library.zip
: Contains all functions support for UART firmware library on LPC17xx More...
Go to the source code of this file.
Functions | |
uint8_t | getUartNum (LPC_UART_TypeDef *UARTx) |
Get UART number due to UART peripheral pointer. | |
Status | uart_set_divisors (LPC_UART_TypeDef *UARTx, uint32_t baudrate) |
Determines best dividers to get a target clock rate. | |
void | UART_GenIntHandler (LPC_UART_TypeDef *UARTx) |
General UART interrupt handler and router. | |
void | UART_DeInit (LPC_UART_TypeDef *UARTx) |
De-initializes the UARTx peripheral registers to their default reset values. | |
void | UART_Init (LPC_UART_TypeDef *UARTx, UART_CFG_Type *UART_ConfigStruct) |
Initializes the UARTx peripheral according to the specified parameters in the UART_ConfigStruct. | |
void | UART_ConfigStructInit (UART_CFG_Type *UART_InitStruct) |
Fills each UART_InitStruct member with its default value: 9600 bps 8-bit data 1 Stopbit None Parity. | |
void | UART_SendData (LPC_UART_TypeDef *UARTx, uint8_t Data) |
Transmit a single data through UART peripheral. | |
uint8_t | UART_ReceiveData (LPC_UART_TypeDef *UARTx) |
Receive a single data from UART peripheral. | |
void | UART_ForceBreak (LPC_UART_TypeDef *UARTx) |
Force BREAK character on UART line, output pin UARTx TXD is forced to logic 0. | |
void | UART_IrDAInvtInputCmd (LPC_UART_TypeDef *UARTx, FunctionalState NewState) |
Enable or disable inverting serial input function of IrDA on UART peripheral. | |
void | UART_IrDACmd (LPC_UART_TypeDef *UARTx, FunctionalState NewState) |
Enable or disable IrDA function on UART peripheral. | |
void | UART_IrDAPulseDivConfig (LPC_UART_TypeDef *UARTx, UART_IrDA_PULSE_Type PulseDiv) |
Configure Pulse divider for IrDA function on UART peripheral. | |
void | UART_IntConfig (LPC_UART_TypeDef *UARTx, UART_INT_Type UARTIntCfg, FunctionalState NewState) |
Enable or disable specified UART interrupt. | |
uint8_t | UART_GetLineStatus (LPC_UART_TypeDef *UARTx) |
Get current value of Line Status register in UART peripheral. | |
FlagStatus | UART_CheckBusy (LPC_UART_TypeDef *UARTx) |
Check whether if UART is busy or not. | |
void | UART_FIFOConfig (LPC_UART_TypeDef *UARTx, UART_FIFO_CFG_Type *FIFOCfg) |
Configure FIFO function on selected UART peripheral. | |
void | UART_FIFOConfigStructInit (UART_FIFO_CFG_Type *UART_FIFOInitStruct) |
Fills each UART_FIFOInitStruct member with its default value:
| |
void | UART_ABCmd (LPC_UART_TypeDef *UARTx, UART_AB_CFG_Type *ABConfigStruct,\FunctionalState NewState) |
Start/Stop Auto Baudrate activity. | |
void | UART_TxCmd (LPC_UART_TypeDef *UARTx, FunctionalState NewState) |
Enable/Disable transmission on UART TxD pin. | |
void | UART_FullModemForcePinState (LPC_UART1_TypeDef *UARTx, UART_MODEM_PIN_Type Pin,\UART1_SignalState NewState) |
Force pin DTR/RTS corresponding to given state (Full modem mode) | |
void | UART_FullModemConfigMode (LPC_UART1_TypeDef *UARTx, UART_MODEM_MODE_Type Mode,\FunctionalState NewState) |
Configure Full Modem mode for UART peripheral. | |
uint8_t | UART_FullModemGetStatus (LPC_UART1_TypeDef *UARTx) |
Get current status of modem status register. | |
void | UART_RS485Config (LPC_UART1_TypeDef *UARTx, UART1_RS485_CTRLCFG_Type *RS485ConfigStruct) |
Configure UART peripheral in RS485 mode according to the specified parameters in the RS485ConfigStruct. | |
void | UART_RS485ReceiverCmd (LPC_UART1_TypeDef *UARTx, FunctionalState NewState) |
Enable/Disable receiver in RS485 module in UART1. | |
uint32_t | UART_RS485Send (LPC_UART1_TypeDef *UARTx, uint8_t *pDatFrm,\uint32_t size, uint8_t ParityStick) |
Send data on RS485 bus with specified parity stick value (9-bit mode). | |
void | UART_RS485SendSlvAddr (LPC_UART1_TypeDef *UARTx, uint8_t SlvAddr) |
Send Slave address frames on RS485 bus. | |
uint32_t | UART_RS485SendData (LPC_UART1_TypeDef *UARTx, uint8_t *pData, uint32_t size) |
Send Data frames on RS485 bus. | |
uint32_t | UART_Send (LPC_UART_TypeDef *UARTx, uint8_t *txbuf, uint32_t buflen, TRANSFER_BLOCK_Type flag) |
Send a block of data via UART peripheral. | |
uint32_t | UART_Receive (LPC_UART_TypeDef *UARTx, uint8_t *rxbuf,\uint32_t buflen, TRANSFER_BLOCK_Type flag) |
Receive a block of data via UART peripheral. | |
void | UART_SetupCbs (LPC_UART_TypeDef *UARTx, uint8_t CbType, void *pfnCbs) |
Setup call-back function for UART interrupt handler for each UART peripheral. | |
void | UART0_StdIntHandler (void) |
Standard UART0 interrupt handler. | |
void | UART1_StdIntHandler (void) |
Standard UART1 interrupt handler. | |
void | UART2_StdIntHandler (void) |
Standard UART2 interrupt handler. | |
void | UART3_StdIntHandler (void) |
Standard UART3 interrupt handler. | |
Variables | |
UART_CBS_Type | uartCbsDat [4] |
Call-back function pointer data. | |
fnModemCbs_Type * | pfnModemCbs = NULL |
UART1 modem status interrupt callback pointer data. |
Detailed Description
: Contains all functions support for UART firmware library on LPC17xx
- Version:
- : 1.0
- Date:
- : 18. Mar. 2009
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.c.
Generated on Tue Jul 12 2022 17:06:02 by 1.7.2