xous-core/kernel/src/io.rs
bunnie 90108f266e allow this trait to be unused
it's not used in all configs but it's not a bad thing to have
it around.
2024-05-10 00:38:41 +08:00

16 lines
484 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.
#[allow(dead_code)]
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.
#[allow(dead_code)]
pub trait SerialRead {
/// Read a single byte.
fn getc(&mut self) -> Option<u8>;
}