L4Re Operating System Framework
Interface and Usage Documentation
Loading...
Searching...
No Matches
uart_lpuart.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) 2019 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_lpuart : public Uart
19 {
20 public:
21 explicit Uart_lpuart() {}
22 explicit Uart_lpuart(unsigned /*base_rate*/) {}
23 bool startup(Io_register_block const *) override;
24 void shutdown() override;
25 bool enable_rx_irq(bool enable = true) override;
26 bool change_mode(Transfer_mode m, Baud_rate r) override;
27 int get_char(bool blocking = true) const override;
28 int char_avail() const override;
29 int tx_avail() const;
30 void wait_tx_done() const {}
31 inline void out_char(char c) const;
32 int write(char const *s, unsigned long count,
33 bool blocking = true) const override;
34 };
35};
L4 low-level kernel interface.
Definition io_regblock.h:19