mirror of
https://github.com/saymrwulf/xous-core.git
synced 2026-11-08 04:56:43 +00:00
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>
14 lines
444 B
Rust
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>;
|
|
}
|