use serde::{Deserialize, Serialize};

pub mod display;
pub mod serial;
// #[derive(Debug, Clone, Copy, PartialEq, Eq, Serialize, Deserialize)]
// pub enum DeviceId {
//     Display,
//     Serial,
//     Random,
//     Timer,
// }

// pub trait IoHandle: Send {
//     /// Return the size (in bytes) of the device's addressable region.
//     fn size(&self) -> usize;

//     /// Return the access permissions for the device.
//     fn access(&self) -> IoAccess;

//     /// Return the DeviceId
//     fn id(&self) -> DeviceId;
// }

// #[derive(Clone, Copy, Debug, PartialEq)]
// pub struct IoAccess(u8);

// impl IoAccess {
//     pub const READ: Self = Self(0b01);
//     pub const WRITE: Self = Self(0b10);

//     /// Convenience alias for Read + Write.
//     pub const READWRITE: Self = Self(Self::READ.0 | Self::WRITE.0);
//     pub const NONE: Self = Self(0);

//     /// Bitwise OR – returns a new `IoAccess` that contains all flags from both operands.
//     #[inline]
//     pub fn or(self, other: Self) -> Self {
//         Self(self.0 | other.0)
//     }

//     /// Check if a flag is present.
//     #[inline]
//     pub fn contains(&self, flag: Self) -> bool {
//         self.0 & flag.0 != 0
//     }
// }
