L4Re Operating System Framework
Interface and Usage Documentation
•All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
uart_dummy.h
1/*
2 * Copyright 2009 Technische Universität Dresden.
3 * Copyright (C) 2023-2024 Kernkonzept GmbH.
4 * Author(s): Adam Lackorzynski <adam@os.inf.tu-dresden.de>
5 *
6 * License: see LICENSE.spdx (in this directory or the directories above)
7 */
8#pragma once
9
10#include "uart_base.h"
11
12namespace L4
13{
14 class Uart_dummy : public Uart
15 {
16 public:
17 explicit Uart_dummy() {}
18 explicit Uart_dummy(unsigned /*base_rate*/) {}
19 bool startup(Io_register_block const *) override { return true; }
20 void shutdown() override {}
21 bool change_mode(Transfer_mode, Baud_rate) override { return true; }
22 int get_char(bool /*blocking*/ = true) const override { return 0; }
23 int char_avail() const override { return false; }
24 inline void out_char(char /*ch*/) const {}
25 int write(char const * /*str*/, unsigned long /*count*/,
26 bool /*blocking*/ = true) const override
27 { return 0; }
28 };
29};
L4 low-level kernel interface.