RTEMS  5.0.0
Macros | Functions
alt_16550_uart.c File Reference
#include <bsp/alt_16550_uart.h>
#include <bsp/alt_clock_manager.h>
#include <bsp/socal/alt_rstmgr.h>
#include <bsp/socal/alt_uart.h>
#include <bsp/socal/hps.h>
#include <bsp/socal/socal.h>

Macros

#define ALT_16550_HANDLE_DATA_UART_ENABLED_MSK   (1UL << 31)
 
#define ALT_16550_HANDLE_DATA_DIVISOR_VALUE_GET(value)   (value & 0xffff)
 
#define ALT_ALTERA_16550_CPR_OFST   (0xF4)
 
#define ALT_ALTERA_16550_CPR_ADDR(base)   ALT_CAST(void *, (ALT_CAST(char *, (base)) + ALT_ALTERA_16550_CPR_OFST))
 
#define ALT_ALTERA_16550_CPR_FIFO_MODE_GET(value)   (((value) >> 16) & 0xff)
 
#define ALT_ALTERA_16550_CPR_AFCE_MODE_SET_MSK   (1 << 4)
 
#define ALT_UART_IER_DLH_VALUE_SET(value)   ((value) & 0xff)
 
#define ALT_UART_IER_DLH_ETBEI_DLH1_SET_MSK   ALT_UART_IER_DLH_ETBEI_DLHL_SET_MSK
 

Functions

ALT_STATUS_CODE alt_16550_init (ALT_16550_DEVICE_t device, void *location, alt_freq_t clock_freq, ALT_16550_HANDLE_t *handle)
 
ALT_STATUS_CODE alt_16550_uninit (ALT_16550_HANDLE_t *handle)
 
ALT_STATUS_CODE alt_16550_reset (ALT_16550_HANDLE_t *handle)
 
ALT_STATUS_CODE alt_16550_enable (ALT_16550_HANDLE_t *handle)
 
ALT_STATUS_CODE alt_16550_disable (ALT_16550_HANDLE_t *handle)
 
ALT_STATUS_CODE alt_16550_read (ALT_16550_HANDLE_t *handle, char *item)
 
ALT_STATUS_CODE alt_16550_write (ALT_16550_HANDLE_t *handle, char item)
 
ALT_STATUS_CODE alt_16550_fifo_enable (ALT_16550_HANDLE_t *handle)
 
ALT_STATUS_CODE alt_16550_fifo_disable (ALT_16550_HANDLE_t *handle)
 
ALT_STATUS_CODE alt_16550_fifo_read (ALT_16550_HANDLE_t *handle, char *buffer, size_t count)
 
ALT_STATUS_CODE alt_16550_fifo_write (ALT_16550_HANDLE_t *handle, const char *buffer, size_t count)
 
ALT_STATUS_CODE alt_16550_fifo_clear_rx (ALT_16550_HANDLE_t *handle)
 
ALT_STATUS_CODE alt_16550_fifo_clear_tx (ALT_16550_HANDLE_t *handle)
 
ALT_STATUS_CODE alt_16550_fifo_clear_all (ALT_16550_HANDLE_t *handle)
 
ALT_STATUS_CODE alt_16550_fifo_size_get_rx (ALT_16550_HANDLE_t *handle, uint32_t *size)
 
ALT_STATUS_CODE alt_16550_fifo_size_get_tx (ALT_16550_HANDLE_t *handle, uint32_t *size)
 
ALT_STATUS_CODE alt_16550_fifo_level_get_rx (ALT_16550_HANDLE_t *handle, uint32_t *level)
 
ALT_STATUS_CODE alt_16550_fifo_level_get_tx (ALT_16550_HANDLE_t *handle, uint32_t *level)
 
ALT_STATUS_CODE alt_16550_fifo_trigger_set_rx (ALT_16550_HANDLE_t *handle, ALT_16550_FIFO_TRIGGER_RX_t trigger)
 
ALT_STATUS_CODE alt_16550_fifo_trigger_set_tx (ALT_16550_HANDLE_t *handle, ALT_16550_FIFO_TRIGGER_TX_t trigger)
 
ALT_STATUS_CODE alt_16550_baudrate_get (ALT_16550_HANDLE_t *handle, uint32_t *baudrate)
 
ALT_STATUS_CODE alt_16550_baudrate_set (ALT_16550_HANDLE_t *handle, uint32_t baudrate)
 
ALT_STATUS_CODE alt_16550_divisor_get (ALT_16550_HANDLE_t *handle, uint32_t *divisor)
 
ALT_STATUS_CODE alt_16550_divisor_set (ALT_16550_HANDLE_t *handle, uint32_t divisor)
 
ALT_STATUS_CODE alt_16550_int_enable_rx (ALT_16550_HANDLE_t *handle)
 
ALT_STATUS_CODE alt_16550_int_disable_rx (ALT_16550_HANDLE_t *handle)
 
ALT_STATUS_CODE alt_16550_int_enable_tx (ALT_16550_HANDLE_t *handle)
 
ALT_STATUS_CODE alt_16550_int_disable_tx (ALT_16550_HANDLE_t *handle)
 
ALT_STATUS_CODE alt_16550_int_enable_line (ALT_16550_HANDLE_t *handle)
 
ALT_STATUS_CODE alt_16550_int_disable_line (ALT_16550_HANDLE_t *handle)
 
ALT_STATUS_CODE alt_16550_int_enable_modem (ALT_16550_HANDLE_t *handle)
 
ALT_STATUS_CODE alt_16550_int_disable_modem (ALT_16550_HANDLE_t *handle)
 
ALT_STATUS_CODE alt_16550_int_disable_all (ALT_16550_HANDLE_t *handle)
 
ALT_STATUS_CODE alt_16550_int_status_get (ALT_16550_HANDLE_t *handle, ALT_16550_INT_STATUS_t *status)
 
ALT_STATUS_CODE alt_16550_line_config_set (ALT_16550_HANDLE_t *handle, ALT_16550_DATABITS_t databits, ALT_16550_PARITY_t parity, ALT_16550_STOPBITS_t stopbits)
 
ALT_STATUS_CODE alt_16550_line_break_enable (ALT_16550_HANDLE_t *handle)
 
ALT_STATUS_CODE alt_16550_line_break_disable (ALT_16550_HANDLE_t *handle)
 
ALT_STATUS_CODE alt_16550_line_status_get (ALT_16550_HANDLE_t *handle, uint32_t *status)
 
ALT_STATUS_CODE alt_16550_flowcontrol_enable (ALT_16550_HANDLE_t *handle)
 
ALT_STATUS_CODE alt_16550_flowcontrol_disable (ALT_16550_HANDLE_t *handle)
 
ALT_STATUS_CODE alt_16550_loopback_enable (ALT_16550_HANDLE_t *handle)
 
ALT_STATUS_CODE alt_16550_loopback_disable (ALT_16550_HANDLE_t *handle)
 
ALT_STATUS_CODE alt_16550_modem_enable_out1 (ALT_16550_HANDLE_t *handle)
 
ALT_STATUS_CODE alt_16550_modem_disable_out1 (ALT_16550_HANDLE_t *handle)
 
ALT_STATUS_CODE alt_16550_modem_enable_out2 (ALT_16550_HANDLE_t *handle)
 
ALT_STATUS_CODE alt_16550_modem_disable_out2 (ALT_16550_HANDLE_t *handle)
 
ALT_STATUS_CODE alt_16550_modem_enable_rts (ALT_16550_HANDLE_t *handle)
 
ALT_STATUS_CODE alt_16550_modem_disable_rts (ALT_16550_HANDLE_t *handle)
 
ALT_STATUS_CODE alt_16550_modem_enable_dtr (ALT_16550_HANDLE_t *handle)
 
ALT_STATUS_CODE alt_16550_modem_disable_dtr (ALT_16550_HANDLE_t *handle)
 
ALT_STATUS_CODE alt_16550_modem_status_get (ALT_16550_HANDLE_t *handle, uint32_t *status)