DRAFT
DRAFT DRAFT DR
DRAFT DRAFT DRAFT
D
RAF
DRAFT DRAFT DRA
FT D
RAFT DR
AFT D
DRA
FT DRAFT DRAFT
D
RAFT
DRAFT
D
RAFT
DRA
UM10601
All information provided in this document is subject to legal disclaimers.
© NXP B.V. 2012. All rights reserved.
Preliminary user manual
Rev. 1.0 — 7 November 2012
286 of 313
NXP Semiconductors
UM10601
Chapter 24: LPC800 USART API ROM driver routines
24.4.2 UART setup
24.4.3 UART init
24.4.4 UART get character
24.4.5 UART put character
Table 273. 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 Min UART instance with provided memory and return the handle to this
instance.
Table 274. 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 275. 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 276. 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.