L4Re Operating System Framework
Interface and Usage Documentation
Loading...
Searching...
No Matches
uart_dm.h
1/* SPDX-License-Identifier: GPL-2.0-only OR License-Ref-kk-custom */
2/*
3 * Copyright (C) 2021-2022 Stephan Gerhold <stephan@gerhold.net>
4 * Copyright (C) 2022-2023 Kernkonzept GmbH.
5 */
6#pragma once
7
8#include "uart_base.h"
9
10namespace L4
11{
12 class Uart_dm : public Uart
13 {
14 public:
15 explicit Uart_dm(unsigned /*base_rate*/) {}
16 bool startup(Io_register_block const *) override;
17 void shutdown() override;
18 bool change_mode(Transfer_mode m, Baud_rate r) override;
19 bool enable_rx_irq(bool enable = true) override;
20 int get_char(bool blocking = true) const override;
21 int char_avail() const override;
22 int tx_avail() const;
23 void wait_tx_done() const;
24 inline void out_char(char c) const;
25 int write(char const *s, unsigned long count,
26 bool blocking = true) const override;
27 };
28};
L4 low-level kernel interface.
Definition io_regblock.h:19