2023-07-18 18:03:45 +03:00
|
|
|
//! Device management and interfaces
|
|
|
|
|
2023-07-29 21:11:15 +03:00
|
|
|
pub mod display;
|
2023-08-02 19:53:54 +03:00
|
|
|
pub mod input;
|
2023-08-01 11:09:56 +03:00
|
|
|
pub mod interrupt;
|
2023-07-18 18:03:45 +03:00
|
|
|
pub mod platform;
|
2023-08-02 19:53:54 +03:00
|
|
|
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;
|
|
|
|
}
|