xous-core/kernel/src/io.rs
Jean-Pierre De Jesus DIAZ b334e5bc31
kernel: Split debug shell and uart driver.
I've added a `platform` module to store all platform specific code, (not
architecture specific) as some platforms will require custom drivers, e.g.
for debug output and for the random number generation code.  The platform
code is in charge of mapping any peripherals needed to work, also to
initialize any other parts of the kernel that require drivers, for example
the debug shell.

Signed-off-by: Jean-Pierre De Jesus DIAZ <me@jeandudey.tech>
2022-11-02 14:30:31 +01:00

14 lines
444 B
Rust

// SPDX-FileCopyrightText: 2022 Foundation Devices, Inc. <hello@foundationdevices.com>
// SPDX-License-Identifier: Apache-2.0
/// A trait for serial like drivers which are byte-oriented sinks.
pub trait SerialWrite {
/// Write a single byte.
fn putc(&mut self, b: u8);
}
/// A trait for serial like drivers which allows reading from a source.
pub trait SerialRead {
/// Read a single byte.
fn getc(&mut self) -> Option<u8>;
}