L4Re Operating System Framework
Interface and Usage Documentation
Loading...
Searching...
No Matches
uart_leon3.h
1/* SPDX-License-Identifier: GPL-2.0-only OR License-Ref-kk-custom */
2/*
3 * Copyright (C) 2023 Kernkonzept GmbH.
4 */
5/*
6 * (c) 2011 Adam Lackorzynski <adam@os.inf.tu-dresden.de>
7 * Björn Döbel <doebel@os.inf.tu-dresden.de>
8 * economic rights: Technische Universität Dresden (Germany)
9 *
10 * This file is part of TUD:OS and distributed under the terms of the
11 * GNU General Public License 2.
12 * Please see the COPYING-GPL-2 file for details.
13 */
14#pragma once
15
16#include "uart_base.h"
17
18namespace L4
19{
20 class Uart_leon3 : public Uart
21 {
22 public:
23 explicit Uart_leon3() {}
24 explicit Uart_leon3(unsigned /*base_rate*/) {}
25 bool startup(Io_register_block const *) override;
26 void shutdown() override;
27 bool change_mode(Transfer_mode m, Baud_rate r) override;
28 int get_char(bool blocking = true) const override;
29 int char_avail() const override;
30 int tx_avail() const;
31 void wait_tx_done() const;
32 bool enable_rx_irq(bool = true) override;
33 inline void out_char(char c) const;
34 int write(char const *s, unsigned long count,
35 bool blocking = true) const override;
36 };
37};
L4 low-level kernel interface.
Definition io_regblock.h:19