This group contains the Zynq UART support.
More...
|
#define | ZYNQ_UART_DEFAULT_BAUD 115200 |
|
#define | ZYNQ_UART_FIFO_DEPTH 64 |
|
#define | ZYNQ_UART_0_BASE_ADDR 0xe0000000 |
| This constant defines the Xilinx Zynq UART 0 base address.
|
|
#define | ZYNQ_UART_1_BASE_ADDR 0xe0001000 |
| This constant defines the Xilinx Zynq UART 1 base address.
|
|
#define | ZYNQ_UART_0_BASE_ADDR 0xff000000 |
| This constant defines the Xilinx Zynq UART 0 base address.
|
|
#define | ZYNQ_UART_1_BASE_ADDR 0xff010000 |
| This constant defines the Xilinx Zynq UART 1 base address.
|
|
|
void | zynq_uart_initialize (volatile zynq_uart *regs) |
|
int | zynq_uart_read_char_polled (volatile zynq_uart *regs) |
|
void | zynq_uart_write_char_polled (volatile zynq_uart *regs, char c) |
|
void | zynq_uart_reset_tx_flush (volatile zynq_uart *regs) |
|
uint32_t | zynq_uart_input_clock (void) |
| Returns the Zynq UART input clock frequency in Hz.
|
|
uint32_t | zynq_uart_calculate_baud (uint32_t desired_baud, uint32_t mode_clks, uint32_t *cd_ptr, uint32_t *bdiv_ptr) |
| Calculates the clock and baud divisor of the best approximation of the desired baud.
|
|
This group contains the Zynq UART support.
◆ zynq_uart_calculate_baud()
uint32_t zynq_uart_calculate_baud |
( |
uint32_t |
desired_baud, |
|
|
uint32_t |
mode_clks, |
|
|
uint32_t * |
cd_ptr, |
|
|
uint32_t * |
bdiv_ptr |
|
) |
| |
Calculates the clock and baud divisor of the best approximation of the desired baud.
The function tries to yield a sample set around 16 per RX-bit.
- Parameters
-
desired_baud | is the desired baud for an Zynq UART device. |
mode_clks | is the value of the CLKS bit of the Zynq UART mode register. |
cd_ptr[out] | is a reference to an uint32_t object. The function stores the calculated clock divisor to this object. |
bdiv_ptr[out] | is a reference to an uint32_t object. The function stores the calculated baud divisor to this object. |
- Returns
- Returns the absolute error of the calculated baud to the desired baud in Hz.
◆ zynq_uart_reset_tx_flush()
void zynq_uart_reset_tx_flush |
( |
volatile zynq_uart * |
regs | ) |
|
Flush TX FIFO and wait until it is empty. Used in bsp_reset.