3 * \brief PXA Uart header file
6 * \author Adam Lackorznynski <adam@os.inf.tu-dresden.de>
7 * Alexander Warg <alexander.warg@os.inf.tu-dresden.de>
11 * (c) 2008-2009 Author(s)
12 * economic rights: Technische Universität Dresden (Germany)
14 * This file is part of TUD:OS and distributed under the terms of the
15 * GNU General Public License 2.
16 * Please see the COPYING-GPL-2 file for details.
18 #ifndef __L4_CXX_UART_PXA_H__
19 #define __L4_CXX_UART_PXA_H__
21 #include "uart_base.h"
25 class Uart_pxa : public Uart
30 inline unsigned long rd(unsigned long reg) const;
31 inline void wr(unsigned long reg, unsigned long val) const;
34 Uart_pxa(int rx_irq, int tx_irq)
35 : Uart(rx_irq, tx_irq), _base(~0UL) {}
36 bool startup(unsigned long base);
38 bool enable_rx_irq(bool enable = true);
39 bool enable_tx_irq(bool enable = true);
40 bool change_mode(Transfer_mode m, Baud_rate r);
41 int get_char(bool blocking = true) const;
42 int char_avail() const;
43 inline void out_char(char c) const;
44 int write(char const *s, unsigned long count) const;