L4Re Operating System Framework – Interface and Usage Documentation
Loading...
Searching...
No Matches
uart_linflex.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) 2018 Adam Lackorzynski <adam@l4re.org>
7 *
8 * This file is part of L4Re and distributed under the terms of the
9 * GNU General Public License 2.
10 * Please see the COPYING-GPL-2 file for details.
11 */
12#pragma once
13
14#include "uart_base.h"
15
16namespace L4
17{
18 class Uart_linflex : public Uart
19 {
20 public:
21 explicit Uart_linflex(unsigned) {}
22 bool startup(Io_register_block const *) override;
23 void shutdown() override;
24 bool enable_rx_irq(bool enable = true) override;
25 bool change_mode(Transfer_mode m, Baud_rate r) override;
26 int get_char(bool blocking = true) const override;
27 int char_avail() const override;
28 int tx_avail() const;
29 void wait_tx_done() const;
30 inline void out_char(char c) const;
31 int write(char const *s, unsigned long count,
32 bool blocking = true) const override;
33 };
34};
L4 low-level kernel interface.