
UM10800
All information provided in this document is subject to legal disclaimers.
© NXP Semiconductors N.V. 2016. All rights reserved.
User manual
Rev. 1.2 — 5 October 2016
400 of 487
NXP Semiconductors
UM10800
Chapter 27: LPC82x ROM API USART driver routines
27.4.2 UART setup
27.4.3 UART init
27.4.4 UART get character
27.4.5 UART put character
Table 348. uart_setup
Routine
uart_setup
Prototype
UART_HANDLE_T* uart_setup(uint32_t base_addr, uint8_t *ram) ;
Input parameter
base_addr: Base address of register for this uart block.
ram: Pointer to the memory space for uart instance. The size of the memory
space can be obtained by the uart_get_mem_size function.
Return
The handle to corresponding uart instance.
Description
Setup UART instance with provided memory and return the handle to this
instance.
Table 349. uart_init
Routine
uart_init
Prototype
uint32_t uart_init(UART_HANDLE_T* handle, UART_CONFIG set);
Input parameter
handle: The handle to the uart instance.
set: configuration for uart operation.
Return
Fractional divider value if System clock is not integer multiples of baud rate.
Description
Setup baud rate and operation mode for uart, then enable uart.
Table 350. uart_get_char
Routine
uart_get_char
Prototype
uint8_t uart_get_char(UART_HANDLE_T* handle);
Input parameter
handle: The handle to the uart instance.
Return
Received data
Description
Receive one Char from uart. This functions is only returned after Char is
received. In case Echo is enabled, the received data is sent out immediately.
Table 351. uart_put_char
Routine
uart_put_char
Prototype
void uart_put_char(UART_HANDLE_T* handle, uint8_t data);
Input parameter
handle: The handle to the uart instance.
data: data to be sent out.
Return
None.
Description
Send one Char through uart. This function is only returned after data is sent.