23 lines
515 B
Rust
Raw Normal View History

2023-07-18 18:03:45 +03:00
//! Device management and interfaces
2023-07-29 21:11:15 +03:00
pub mod display;
pub mod input;
pub mod interrupt;
2023-07-18 18:03:45 +03:00
pub mod platform;
pub mod serial;
pub mod timer;
pub mod tty;
2023-07-18 18:03:45 +03:00
/// General device interface
pub trait Device {
2023-08-03 18:49:29 +03:00
// /// Initializes the device to a state where it can be used.
// ///
// /// # Safety
// ///
// /// Unsafe to call if the device has already been initialized.
// unsafe fn init(&self) -> Result<(), Error>;
2023-07-18 18:03:45 +03:00
/// Returns a display name for the device
fn name(&self) -> &'static str;
}