14class Uart_s3c :
public Uart
19 Type_24xx, Type_64xx, Type_s5pv210,
22 Uart_type type()
const {
return _type; }
25 explicit Uart_s3c(Uart_type type) : _type(type) {}
26 explicit Uart_s3c(Uart_type type,
unsigned ) : _type(type) {}
27 bool startup(Io_register_block
const *)
override;
29 bool change_mode(Transfer_mode m, Baud_rate r)
override;
31 void wait_tx_done()
const;
32 inline void out_char(
char c)
const;
33 int write(
char const *s,
unsigned long count,
34 bool blocking =
true)
const override;
37#ifndef UART_WITHOUT_INPUT
39 int get_char(
bool blocking =
true)
const override;
43 virtual void ack_rx_irq()
const = 0;
44 virtual void wait_for_empty_tx_fifo()
const = 0;
45 virtual unsigned is_rx_fifo_non_empty()
const = 0;
46 virtual unsigned is_tx_fifo_not_full()
const = 0;
52class Uart_s3c2410 :
public Uart_s3c
55 Uart_s3c2410() : Uart_s3c(Type_24xx) {}
56 explicit Uart_s3c2410(
unsigned base_rate) : Uart_s3c(Type_24xx, base_rate) {}
59 void ack_rx_irq()
const override {}
60 void wait_for_empty_tx_fifo()
const override;
61 unsigned is_rx_fifo_non_empty()
const override;
62 unsigned is_tx_fifo_not_full()
const override;
64 void auto_flow_control(
bool on);
67class Uart_s3c64xx :
public Uart_s3c
70 Uart_s3c64xx() : Uart_s3c(Type_64xx) {}
71 explicit Uart_s3c64xx(
unsigned base_rate) : Uart_s3c(Type_64xx, base_rate) {}
74 void ack_rx_irq()
const override;
75 void wait_for_empty_tx_fifo()
const override;
76 unsigned is_rx_fifo_non_empty()
const override;
77 unsigned is_tx_fifo_not_full()
const override;
80class Uart_s5pv210 :
public Uart_s3c
83 Uart_s5pv210() : Uart_s3c(Type_s5pv210) {}
84 explicit Uart_s5pv210(
unsigned base_rate) : Uart_s3c(Type_s5pv210, base_rate) {}
87 void ack_rx_irq()
const override;
88 void wait_for_empty_tx_fifo()
const override;
89 unsigned is_rx_fifo_non_empty()
const override;
90 unsigned is_tx_fifo_not_full()
const override;
virtual void shutdown()=0
Terminate the UART driver.
virtual int char_avail() const =0
Check if there is at least one character available for reading from the UART.
L4 low-level kernel interface.