]> rtime.felk.cvut.cz Git - l4.git/blob - kernel/fiasco/src/lib/uart/ppc32/uart_of.h
update
[l4.git] / kernel / fiasco / src / lib / uart / ppc32 / uart_of.h
1 #ifndef L4_CXX_UART_OF_H__
2 #define L4_CXX_UART_OF_H__
3
4 #include "uart_base.h"
5 #include <stdarg.h>
6 #include <string.h>
7 #include "of1275.h"
8
9 namespace L4
10 {
11         class Uart_of : public Uart, public Of
12         {
13         private:
14                 ihandle_t  _serial;
15
16         public:
17                 Uart_of(unsigned long prom)
18                   : Uart(0, 0), Of(prom), _serial(0) {}
19                 bool startup(unsigned long base);
20
21                 void shutdown();
22                 bool enable_rx_irq(bool enable = true);
23                 bool enable_tx_irq(bool enable = true);
24                 bool change_mode(Transfer_mode m, Baud_rate r);
25                 int get_char(bool blocking = true) const;
26                 int char_avail() const;
27                 void out_char(char c) const;
28                 int write(char const *s, unsigned long count) const;
29         };
30 };
31
32 #endif