L4Re Operating System Framework
Interface and Usage Documentation
Loading...
Searching...
No Matches
uart_mvebu.h
1/*
2 * Copyright (C) 2017, 2023-2024 Kernkonzept GmbH.
3 * Author(s) Adam Lackorzynski <adam@l4re.org>
4 *
5 * License: see LICENSE.spdx (in this directory or the directories above)
6 */
7#pragma once
8
9#include "uart_base.h"
10
11namespace L4
12{
13 class Uart_mvebu : public Uart
14 {
15 public:
16 explicit Uart_mvebu(unsigned baserate) : _baserate(baserate) {}
17 bool startup(Io_register_block const *) override;
18 void shutdown() override;
19 bool enable_rx_irq(bool enable = true) override;
20 bool change_mode(Transfer_mode m, Baud_rate r) override;
21 int get_char(bool blocking = true) const override;
22 int char_avail() const override;
23 int tx_avail() const;
24 void wait_tx_done() const {}
25 inline void out_char(char c) const;
26 int write(char const *s, unsigned long count,
27 bool blocking = true) const override;
28 private:
29 unsigned _baserate;
30 };
31};
L4 low-level kernel interface.