L4Re Operating System Framework
Interface and Usage Documentation
Loading...
Searching...
No Matches
uart_sbi.h
1/* SPDX-License-Identifier: GPL-2.0-only or License-Ref-kk-custom */
2/*
3 * Copyright (C) 2021 Kernkonzept GmbH.
4 * Author(s): Georg Kotheimer <georg.kotheimer@kernkonzept.com>
5 */
6#pragma once
7
8#include "uart_base.h"
9
10namespace L4
11{
12 class Uart_sbi : public Uart
13 {
14 public:
15 Uart_sbi();
16 explicit Uart_sbi(unsigned /*base_rate*/) : Uart_sbi() {}
17 bool startup(Io_register_block const *) override;
18 void shutdown() override;
19 bool change_mode(Transfer_mode m, Baud_rate r) override;
20 int get_char(bool blocking = true) const override;
21 int char_avail() const override;
22 int tx_avail() const { return true; }
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 private:
28 mutable int _bufchar;
29 };
30};
L4 low-level kernel interface.
Definition io_regblock.h:19