VF6xx Universal Asynchronous Receiver/Transmitter (UART)
More...
VF6xx Universal Asynchronous Receiver/Transmitter (UART)
UART API.
- Author
- © 2014 Stefan Agner stefa.nosp@m.n@ag.nosp@m.ner.c.nosp@m.h
- Date
- 03 July 2014
This library supports the UART in the VF6xx SoC of Freescale. Devices can have up to 6 UARTs.
LGPL License Terms libopencm3 License
◆ uart_disable()
void uart_disable |
( |
uint32_t |
uart | ) |
|
UART Disable.
At the end of the current frame, the UART is disabled to reduce power.
- Parameters
-
Definition at line 127 of file uart.c.
References UART_C2, UART_C2_RE, and UART_C2_TE.
◆ uart_enable()
void uart_enable |
( |
uint32_t |
uart | ) |
|
◆ uart_recv()
uint8_t uart_recv |
( |
uint32_t |
uart | ) |
|
◆ uart_recv_blocking()
uint8_t uart_recv_blocking |
( |
uint32_t |
uart | ) |
|
UART Read a Received Data Word with Blocking.
Wait until a data word has been received then return the word.
- Parameters
-
- Returns
- unsigned 16 bit data word.
Definition at line 217 of file uart.c.
References uart_recv(), and uart_wait_recv_ready().
◆ uart_send()
void uart_send |
( |
uint32_t |
uart, |
|
|
uint8_t |
data |
|
) |
| |
◆ uart_send_blocking()
void uart_send_blocking |
( |
uint32_t |
uart, |
|
|
uint8_t |
data |
|
) |
| |
UART Send Data byte blocking.
Blocks until the transmit data buffer becomes empty before sending the next (given) byte.
- Parameters
-
Definition at line 171 of file uart.c.
References uart_send(), and uart_wait_send_ready().
◆ uart_set_baudrate()
void uart_set_baudrate |
( |
uint32_t |
uart, |
|
|
uint32_t |
baud |
|
) |
| |
◆ uart_set_flow_control()
void uart_set_flow_control |
( |
uint32_t |
uart, |
|
|
uint8_t |
flowcontrol |
|
) |
| |
UART Set Hardware Flow Control.
The flow control bit can be selected as none, RTS, CTS or RTS+CTS.
- Parameters
-
[in] | uart | unsigned 32 bit. UART block register address base UART register base addresses |
[in] | flowcontrol | unsigned 8 bit. Flowcontrol uart_cr3_flowcontrol. |
Definition at line 95 of file uart.c.
References UART_MODEM.
◆ uart_set_parity()
void uart_set_parity |
( |
uint32_t |
uart, |
|
|
uint8_t |
parity |
|
) |
| |
UART Set Parity.
The parity bit can be selected as none, even or odd.
- Parameters
-
Definition at line 76 of file uart.c.
References UART_C1.
◆ uart_wait_recv_ready()
void uart_wait_recv_ready |
( |
uint32_t |
uart | ) |
|
◆ uart_wait_send_ready()
void uart_wait_send_ready |
( |
uint32_t |
uart | ) |
|
UART Wait for Transmit Data Buffer Empty.
Blocks until the transmit data buffer becomes empty and is ready to accept the next data word.
- Parameters
-
Definition at line 155 of file uart.c.
References UART_S1, and UART_S1_TC.
Referenced by uart_send_blocking().