41#ifndef __ALT_16550_UART_H__
42#define __ALT_16550_UART_H__
668 uint32_t * baudrate);
uint32_t alt_freq_t
Definition: alt_clock_manager.h:66
ALT_STATUS_CODE alt_16550_read(ALT_16550_HANDLE_t *handle, char *item)
Definition: alt_16550_uart.c:286
ALT_STATUS_CODE alt_16550_disable(ALT_16550_HANDLE_t *handle)
Definition: alt_16550_uart.c:279
ALT_STATUS_CODE alt_16550_uninit(ALT_16550_HANDLE_t *handle)
Definition: alt_16550_uart.c:250
struct ALT_16550_HANDLE_s ALT_16550_HANDLE_t
ALT_16550_DEVICE_e
Definition: alt_16550_uart.h:82
ALT_STATUS_CODE alt_16550_init(ALT_16550_DEVICE_t device, void *location, alt_freq_t clock_freq, ALT_16550_HANDLE_t *handle)
Definition: alt_16550_uart.c:189
ALT_STATUS_CODE alt_16550_enable(ALT_16550_HANDLE_t *handle)
Definition: alt_16550_uart.c:271
ALT_STATUS_CODE alt_16550_write(ALT_16550_HANDLE_t *handle, char item)
Definition: alt_16550_uart.c:315
ALT_STATUS_CODE alt_16550_reset(ALT_16550_HANDLE_t *handle)
Definition: alt_16550_uart.c:266
enum ALT_16550_DEVICE_e ALT_16550_DEVICE_t
@ ALT_16550_DEVICE_SOCFPGA_UART1
Definition: alt_16550_uart.h:91
@ ALT_16550_DEVICE_SOCFPGA_UART0
Definition: alt_16550_uart.h:86
@ ALT_16550_DEVICE_ALTERA_16550_UART
Definition: alt_16550_uart.h:97
ALT_16550_BAUDRATE_e
Definition: alt_16550_uart.h:626
ALT_STATUS_CODE alt_16550_divisor_get(ALT_16550_HANDLE_t *handle, uint32_t *divisor)
Definition: alt_16550_uart.c:754
enum ALT_16550_BAUDRATE_e ALT_16550_BAUDRATE_t
ALT_STATUS_CODE alt_16550_divisor_set(ALT_16550_HANDLE_t *handle, uint32_t divisor)
Definition: alt_16550_uart.c:763
ALT_STATUS_CODE alt_16550_baudrate_set(ALT_16550_HANDLE_t *handle, uint32_t baudrate)
Definition: alt_16550_uart.c:733
ALT_STATUS_CODE alt_16550_baudrate_get(ALT_16550_HANDLE_t *handle, uint32_t *baudrate)
Definition: alt_16550_uart.c:714
@ ALT_16550_BAUDRATE_600
Definition: alt_16550_uart.h:631
@ ALT_16550_BAUDRATE_38400
Definition: alt_16550_uart.h:643
@ ALT_16550_BAUDRATE_4800
Definition: alt_16550_uart.h:637
@ ALT_16550_BAUDRATE_115200
Definition: alt_16550_uart.h:645
@ ALT_16550_BAUDRATE_14400
Definition: alt_16550_uart.h:640
@ ALT_16550_BAUDRATE_19200
Definition: alt_16550_uart.h:641
@ ALT_16550_BAUDRATE_50
Definition: alt_16550_uart.h:627
@ ALT_16550_BAUDRATE_7200
Definition: alt_16550_uart.h:638
@ ALT_16550_BAUDRATE_2400
Definition: alt_16550_uart.h:635
@ ALT_16550_BAUDRATE_9600
Definition: alt_16550_uart.h:639
@ ALT_16550_BAUDRATE_900
Definition: alt_16550_uart.h:632
@ ALT_16550_BAUDRATE_3600
Definition: alt_16550_uart.h:636
@ ALT_16550_BAUDRATE_28800
Definition: alt_16550_uart.h:642
@ ALT_16550_BAUDRATE_75
Definition: alt_16550_uart.h:628
@ ALT_16550_BAUDRATE_300
Definition: alt_16550_uart.h:630
@ ALT_16550_BAUDRATE_1200
Definition: alt_16550_uart.h:633
@ ALT_16550_BAUDRATE_57600
Definition: alt_16550_uart.h:644
@ ALT_16550_BAUDRATE_150
Definition: alt_16550_uart.h:629
@ ALT_16550_BAUDRATE_1800
Definition: alt_16550_uart.h:634
ALT_STATUS_CODE alt_16550_fifo_trigger_set_tx(ALT_16550_HANDLE_t *handle, ALT_16550_FIFO_TRIGGER_TX_t trigger)
Definition: alt_16550_uart.c:674
ALT_STATUS_CODE alt_16550_fifo_size_get_tx(ALT_16550_HANDLE_t *handle, uint32_t *size)
Definition: alt_16550_uart.c:558
ALT_STATUS_CODE alt_16550_fifo_read(ALT_16550_HANDLE_t *handle, char *buffer, size_t count)
Definition: alt_16550_uart.c:385
enum ALT_16550_FIFO_TRIGGER_TX_e ALT_16550_FIFO_TRIGGER_TX_t
ALT_STATUS_CODE alt_16550_fifo_clear_rx(ALT_16550_HANDLE_t *handle)
Definition: alt_16550_uart.c:453
enum ALT_16550_FIFO_TRIGGER_RX_e ALT_16550_FIFO_TRIGGER_RX_t
ALT_16550_FIFO_TRIGGER_RX_e
Definition: alt_16550_uart.h:260
ALT_STATUS_CODE alt_16550_fifo_trigger_set_rx(ALT_16550_HANDLE_t *handle, ALT_16550_FIFO_TRIGGER_RX_t trigger)
Definition: alt_16550_uart.c:636
ALT_STATUS_CODE alt_16550_fifo_clear_tx(ALT_16550_HANDLE_t *handle)
Definition: alt_16550_uart.c:479
ALT_STATUS_CODE alt_16550_fifo_enable(ALT_16550_HANDLE_t *handle)
Definition: alt_16550_uart.c:347
ALT_STATUS_CODE alt_16550_fifo_level_get_tx(ALT_16550_HANDLE_t *handle, uint32_t *level)
Definition: alt_16550_uart.c:609
ALT_STATUS_CODE alt_16550_fifo_size_get_rx(ALT_16550_HANDLE_t *handle, uint32_t *size)
Definition: alt_16550_uart.c:535
ALT_STATUS_CODE alt_16550_fifo_level_get_rx(ALT_16550_HANDLE_t *handle, uint32_t *level)
Definition: alt_16550_uart.c:582
ALT_STATUS_CODE alt_16550_fifo_write(ALT_16550_HANDLE_t *handle, const char *buffer, size_t count)
Definition: alt_16550_uart.c:419
ALT_STATUS_CODE alt_16550_fifo_disable(ALT_16550_HANDLE_t *handle)
Definition: alt_16550_uart.c:367
ALT_STATUS_CODE alt_16550_fifo_clear_all(ALT_16550_HANDLE_t *handle)
Definition: alt_16550_uart.c:505
ALT_16550_FIFO_TRIGGER_TX_e
Definition: alt_16550_uart.h:291
@ ALT_16550_FIFO_TRIGGER_RX_ALMOST_FULL
Definition: alt_16550_uart.h:282
@ ALT_16550_FIFO_TRIGGER_RX_QUARTER_FULL
Definition: alt_16550_uart.h:270
@ ALT_16550_FIFO_TRIGGER_RX_HALF_FULL
Definition: alt_16550_uart.h:276
@ ALT_16550_FIFO_TRIGGER_RX_ANY
Definition: alt_16550_uart.h:264
@ ALT_16550_FIFO_TRIGGER_TX_QUARTER_FULL
Definition: alt_16550_uart.h:306
@ ALT_16550_FIFO_TRIGGER_TX_HALF_FULL
Definition: alt_16550_uart.h:312
@ ALT_16550_FIFO_TRIGGER_TX_ALMOST_EMPTY
Definition: alt_16550_uart.h:300
@ ALT_16550_FIFO_TRIGGER_TX_EMPTY
Definition: alt_16550_uart.h:295
ALT_16550_INT_STATUS_e
Definition: alt_16550_uart.h:756
ALT_STATUS_CODE alt_16550_int_disable_all(ALT_16550_HANDLE_t *handle)
Definition: alt_16550_uart.c:866
ALT_STATUS_CODE alt_16550_int_enable_modem(ALT_16550_HANDLE_t *handle)
Definition: alt_16550_uart.c:854
ALT_STATUS_CODE alt_16550_int_disable_line(ALT_16550_HANDLE_t *handle)
Definition: alt_16550_uart.c:848
ALT_STATUS_CODE alt_16550_int_disable_modem(ALT_16550_HANDLE_t *handle)
Definition: alt_16550_uart.c:860
ALT_STATUS_CODE alt_16550_int_disable_rx(ALT_16550_HANDLE_t *handle)
Definition: alt_16550_uart.c:824
ALT_STATUS_CODE alt_16550_int_disable_tx(ALT_16550_HANDLE_t *handle)
Definition: alt_16550_uart.c:836
ALT_STATUS_CODE alt_16550_int_status_get(ALT_16550_HANDLE_t *handle, ALT_16550_INT_STATUS_t *status)
Definition: alt_16550_uart.c:879
enum ALT_16550_INT_STATUS_e ALT_16550_INT_STATUS_t
ALT_STATUS_CODE alt_16550_int_enable_tx(ALT_16550_HANDLE_t *handle)
Definition: alt_16550_uart.c:830
ALT_STATUS_CODE alt_16550_int_enable_rx(ALT_16550_HANDLE_t *handle)
Definition: alt_16550_uart.c:818
ALT_STATUS_CODE alt_16550_int_enable_line(ALT_16550_HANDLE_t *handle)
Definition: alt_16550_uart.c:842
@ ALT_16550_INT_STATUS_NONE
Definition: alt_16550_uart.h:829
@ ALT_16550_INT_STATUS_RX_DATA
Definition: alt_16550_uart.h:785
@ ALT_16550_INT_STATUS_LINE
Definition: alt_16550_uart.h:763
@ ALT_16550_INT_STATUS_TX_IDLE
Definition: alt_16550_uart.h:817
@ ALT_16550_INT_STATUS_RX_TIMEOUT
Definition: alt_16550_uart.h:796
@ ALT_16550_INT_STATUS_MODEM
Definition: alt_16550_uart.h:824
enum ALT_16550_DATABITS_e ALT_16550_DATABITS_t
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)
Definition: alt_16550_uart.c:899
enum ALT_16550_LINE_STATUS_e ALT_16550_LINE_STATUS_t
ALT_STATUS_CODE alt_16550_line_break_disable(ALT_16550_HANDLE_t *handle)
Definition: alt_16550_uart.c:1000
enum ALT_16550_PARITY_e ALT_16550_PARITY_t
ALT_16550_STOPBITS_e
Definition: alt_16550_uart.h:1338
ALT_16550_PARITY_e
Definition: alt_16550_uart.h:1356
ALT_16550_DATABITS_e
Definition: alt_16550_uart.h:1311
ALT_16550_LINE_STATUS_e
Definition: alt_16550_uart.h:1381
enum ALT_16550_STOPBITS_e ALT_16550_STOPBITS_t
ALT_STATUS_CODE alt_16550_line_status_get(ALT_16550_HANDLE_t *handle, uint32_t *status)
Definition: alt_16550_uart.c:1019
ALT_STATUS_CODE alt_16550_line_break_enable(ALT_16550_HANDLE_t *handle)
Definition: alt_16550_uart.c:982
@ ALT_16550_STOPBITS_2
Definition: alt_16550_uart.h:1348
@ ALT_16550_STOPBITS_1
Definition: alt_16550_uart.h:1342
@ ALT_16550_PARITY_DISABLE
Definition: alt_16550_uart.h:1360
@ ALT_16550_PARITY_ODD
Definition: alt_16550_uart.h:1366
@ ALT_16550_PARITY_EVEN
Definition: alt_16550_uart.h:1372
@ ALT_16550_DATABITS_8
Definition: alt_16550_uart.h:1330
@ ALT_16550_DATABITS_6
Definition: alt_16550_uart.h:1320
@ ALT_16550_DATABITS_5
Definition: alt_16550_uart.h:1315
@ ALT_16550_DATABITS_7
Definition: alt_16550_uart.h:1325
@ ALT_16550_LINE_STATUS_DR
Definition: alt_16550_uart.h:1479
@ ALT_16550_LINE_STATUS_PE
Definition: alt_16550_uart.h:1460
@ ALT_16550_LINE_STATUS_OE
Definition: alt_16550_uart.h:1473
@ ALT_16550_LINE_STATUS_TEMT
Definition: alt_16550_uart.h:1400
@ ALT_16550_LINE_STATUS_THRE
Definition: alt_16550_uart.h:1426
@ ALT_16550_LINE_STATUS_FE
Definition: alt_16550_uart.h:1450
@ ALT_16550_LINE_STATUS_BI
Definition: alt_16550_uart.h:1438
@ ALT_16550_LINE_STATUS_RFE
Definition: alt_16550_uart.h:1389
ALT_STATUS_CODE alt_16550_loopback_disable(ALT_16550_HANDLE_t *handle)
Definition: alt_16550_uart.c:1115
ALT_STATUS_CODE alt_16550_flowcontrol_disable(ALT_16550_HANDLE_t *handle)
Definition: alt_16550_uart.c:1097
ALT_16550_MODEM_STATUS_e
Definition: alt_16550_uart.h:999
ALT_STATUS_CODE alt_16550_modem_enable_out1(ALT_16550_HANDLE_t *handle)
Definition: alt_16550_uart.c:1121
ALT_STATUS_CODE alt_16550_modem_disable_out2(ALT_16550_HANDLE_t *handle)
Definition: alt_16550_uart.c:1139
ALT_STATUS_CODE alt_16550_flowcontrol_enable(ALT_16550_HANDLE_t *handle)
Definition: alt_16550_uart.c:1074
ALT_STATUS_CODE alt_16550_modem_enable_out2(ALT_16550_HANDLE_t *handle)
Definition: alt_16550_uart.c:1133
ALT_STATUS_CODE alt_16550_modem_enable_dtr(ALT_16550_HANDLE_t *handle)
Definition: alt_16550_uart.c:1157
ALT_STATUS_CODE alt_16550_loopback_enable(ALT_16550_HANDLE_t *handle)
Definition: alt_16550_uart.c:1103
ALT_STATUS_CODE alt_16550_modem_disable_dtr(ALT_16550_HANDLE_t *handle)
Definition: alt_16550_uart.c:1163
ALT_STATUS_CODE alt_16550_modem_disable_out1(ALT_16550_HANDLE_t *handle)
Definition: alt_16550_uart.c:1127
ALT_STATUS_CODE alt_16550_modem_disable_rts(ALT_16550_HANDLE_t *handle)
Definition: alt_16550_uart.c:1151
ALT_STATUS_CODE alt_16550_modem_enable_rts(ALT_16550_HANDLE_t *handle)
Definition: alt_16550_uart.c:1145
ALT_STATUS_CODE alt_16550_modem_status_get(ALT_16550_HANDLE_t *handle, uint32_t *status)
Definition: alt_16550_uart.c:1169
enum ALT_16550_MODEM_STATUS_e ALT_16550_MODEM_STATUS_t
@ ALT_16550_MODEM_STATUS_DCTS
Definition: alt_16550_uart.h:1061
@ ALT_16550_MODEM_STATUS_DDSR
Definition: alt_16550_uart.h:1053
@ ALT_16550_MODEM_STATUS_DSR
Definition: alt_16550_uart.h:1021
@ ALT_16550_MODEM_STATUS_TERI
Definition: alt_16550_uart.h:1045
@ ALT_16550_MODEM_STATUS_RI
Definition: alt_16550_uart.h:1013
@ ALT_16550_MODEM_STATUS_DDCD
Definition: alt_16550_uart.h:1037
@ ALT_16550_MODEM_STATUS_CTS
Definition: alt_16550_uart.h:1028
@ ALT_16550_MODEM_STATUS_DCD
Definition: alt_16550_uart.h:1005
int32_t ALT_STATUS_CODE
Definition: hwlib.h:60
Definition: alt_16550_uart.h:107