20 class Uart_16550 :
public Uart
38 enum Register_value_iir
43 enum Register_value_lsr
63 MODE_8N1 = PAR_NONE | DAT_8 | STOP_1,
64 MODE_7E1 = PAR_EVEN | DAT_7 | STOP_1,
71 Base_rate_x86 = 115200,
72 Base_rate_pxa = 921600,
75 explicit Uart_16550(
unsigned long base_rate,
unsigned char init_flags = 0,
76 unsigned char ier_bits = 0,
77 unsigned char mcr_bits = 0,
unsigned char fcr_bits = 0)
78 : _base_rate(base_rate), _init_flags(init_flags), _mcr_bits(mcr_bits),
79 _ier_bits(ier_bits), _fcr_bits(fcr_bits)
82 bool startup(Io_register_block
const *regs)
override;
83 void shutdown()
override;
84 bool change_mode(Transfer_mode m, Baud_rate r)
override;
85 int get_char(
bool blocking =
true)
const override;
86 int char_avail()
const override;
88 void wait_tx_done()
const;
89 inline void out_char(
char c)
const;
90 int write(
char const *s,
unsigned long count,
91 bool blocking =
true)
const override;
92 bool enable_rx_irq(
bool enable =
true)
override;
95 unsigned long _base_rate;
96 unsigned char _init_flags;
97 unsigned char _mcr_bits;
98 unsigned char _ier_bits;
99 unsigned char _fcr_bits;
L4 low-level kernel interface.