2 * (c) 2008-2012 Adam Lackorznynski <adam@os.inf.tu-dresden.de>
3 * Alexander Warg <alexander.warg@os.inf.tu-dresden.de>
4 * economic rights: Technische Universität Dresden (Germany)
6 * This file is part of TUD:OS and distributed under the terms of the
7 * GNU General Public License 2.
8 * Please see the COPYING-GPL-2 file for details.
12 #include "uart_base.h"
16 class Uart_16550 : public Uart
31 MODE_8N1 = PAR_NONE | DAT_8 | STOP_1,
32 MODE_7E1 = PAR_EVEN | DAT_7 | STOP_1,
34 // these two values are to leave either mode
35 // or baud rate unchanged on a call to change_mode
39 Base_rate_x86 = 115200,
40 Base_rate_pxa = 921600,
43 explicit Uart_16550(unsigned long base_rate)
44 : _base_rate(base_rate)
47 bool startup(Io_register_block const *regs);
49 bool change_mode(Transfer_mode m, Baud_rate r);
50 int get_char(bool blocking = true) const;
51 int char_avail() const;
52 inline void out_char(char c) const;
53 int write(char const *s, unsigned long count) const;
56 unsigned long _base_rate;