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

Dependencies:   mbed

Embed: (wiki syntax)

« Back to documentation index

UART_Private_Functions

UART_Private_Functions
[UART]

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.

Function Documentation

uint8_t getUartNum ( LPC_UART_TypeDef *  UARTx )

Get UART number due to UART peripheral pointer.

Parameters:
[in]UARTxUART pointer
Returns:
UART number

Definition at line 94 of file lpc17xx_uart.c.

void UART_GenIntHandler ( LPC_UART_TypeDef *  UARTx )

General UART interrupt handler and router.

Parameters:
[in]UARTxSelected UART peripheral, should be UART0..3
Returns:
None

Note:

  • Handles transmit, receive, and status interrupts for the UART. Based on the interrupt status, routes the interrupt to the respective call-back to be handled by the user application using this driver.
  • If callback is not installed, corresponding interrupt will be disabled
  • All these interrupt source below will be checked:
    • Transmit Holding Register Empty.
      • Received Data Available and Character Time Out.
      • Receive Line Status (not implemented)
      • End of auto-baud interrupt (not implemented)
      • Auto-Baudrate Time-Out interrupt (not implemented)
      • Modem Status interrupt (UART0 Modem functionality)
      • CTS signal transition interrupt (UART0 Modem functionality)

Definition at line 235 of file lpc17xx_uart.c.

Status uart_set_divisors ( LPC_UART_TypeDef *  UARTx,
uint32_t  baudrate 
)

Determines best dividers to get a target clock rate.

Parameters:
[in]UARTxPointer to selected UART peripheral, should be UART0, UART1, UART2 or UART3.
[in]baudrateDesired UART baud rate.
Returns:
Error status.

Definition at line 109 of file lpc17xx_uart.c.