L4Re Operating System Framework
Interface and Usage Documentation
Loading...
Searching...
No Matches
uart_geni.h
1/*
2 * Copyright (C) 2022-2024 Kernkonzept GmbH.
3 * Author(s): Stephan Gerhold <stephan.gerhold@kernkonzept.com>
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
13class Uart_geni : public Uart
14{
15public:
16 explicit Uart_geni(unsigned /*base_rate*/) {}
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 tx_avail() const;
21 void wait_tx_done() const;
22 void out_char(char c) const;
23 int write(char const *s, unsigned long count,
24 bool blocking = true) const override;
25
26 bool enable_rx_irq(bool enable = true) override;
27 void irq_ack() override;
28 int char_avail() const override;
29 int get_char(bool blocking = true) const override;
30};
31
32} // namespace L4
Uart driver abstraction.
Definition uart_base.h:21
virtual void irq_ack()
Acknowledge a received interrupt.
Definition uart_base.h:108
virtual void shutdown()=0
Terminate the UART driver.
virtual int char_avail() const =0
Check if there is at least one character available for reading from the UART.
L4 low-level kernel interface.