L4Re Operating System Framework
Interface and Usage Documentation
Loading...
Searching...
No Matches
uart_tegra-tcu.h
1/*
2 * Copyright (C) 2025 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
13class Uart_tegra_tcu : public Uart
14{
15public:
16 Uart_tegra_tcu() {}
17 Uart_tegra_tcu(unsigned long) {}
18 bool startup(Io_register_block const *tx_mbox) override;
19 void set_rx_mbox(Io_register_block const *rx_mbox);
20 void shutdown() override;
21 bool change_mode(Transfer_mode m, Baud_rate r) 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 int char_avail() const override;
29 int get_char(bool blocking = true) const override;
30
31private:
32 mutable unsigned _current_rx_val = 0u;
33 Io_register_block const *_rx_mbox = nullptr;
34};
35
36} // namespace L4
Uart driver abstraction.
Definition uart_base.h:21
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.