RTEMS 6.1-rc6
Loading...
Searching...
No Matches
Files | Data Structures | Macros | Typedefs | Functions | Variables
Zynq UART Support

This group contains the Zynq UART support. More...

Files

file  zynq-uart-regs.h
 This header file provides Zynq UART interfaces.
 
file  zynq-uart-zynq.h
 This header file provides interfaces with respect to the Zynq platform.
 
file  zynq-uart-zynqmp.h
 This header file provides interfaces with respect to the Zynq UltraScale+ MPSoC and RFSoC platforms.
 
file  zynq-uart.h
 This header file provides Zynq UART Termios driver interfaces.
 
file  zynq-uart-input-clock.c
 This source file contains the implementation of the polled Zynq UART support.
 
file  zynq-uart-kernel-io.c
 This source file contains the definition of BSP_output_char and BSP_poll_char.
 
file  zynq-uart-polled.c
 This source file contains the implementation of the polled Zynq UART support.
 

Data Structures

struct  zynq_uart
 
struct  zynq_uart_context
 

Macros

#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.
 

Typedefs

typedef struct zynq_uart zynq_uart
 

Functions

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.
 

Variables

const rtems_termios_device_handler zynq_uart_handler
 

Detailed Description

This group contains the Zynq UART support.

Function Documentation

◆ 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_baudis the desired baud for an Zynq UART device.
mode_clksis 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.