]> rtime.felk.cvut.cz Git - l4.git/blob - kernel/fiasco/src/lib/uart/uart_pl011.h
update
[l4.git] / kernel / fiasco / src / lib / uart / uart_pl011.h
1 #ifndef L4_CXX_UART_PL011_H__
2 #define L4_CXX_UART_PL011_H__
3
4 #include "uart_base.h"
5
6 namespace L4
7 {
8   class Uart_pl011 : public Uart
9   {
10   public:
11     Uart_pl011(unsigned freq) : _freq(freq) {}
12     bool startup(Io_register_block const *);
13     void shutdown();
14     bool change_mode(Transfer_mode m, Baud_rate r);
15     bool enable_rx_irq(bool enable);
16     int get_char(bool blocking = true) const;
17     int char_avail() const;
18     inline void out_char(char c) const;
19     int write(char const *s, unsigned long count) const;
20
21   private:
22     unsigned _freq;
23   };
24 };
25
26 #endif