1 /// 每个架构都需要实现的IO接口 2 #[allow(unused)] 3 pub trait PortIOArch { in8(port: u16) -> u84 unsafe fn in8(port: u16) -> u8; in16(port: u16) -> u165 unsafe fn in16(port: u16) -> u16; in32(port: u16) -> u326 unsafe fn in32(port: u16) -> u32; out8(port: u16, data: u8)7 unsafe fn out8(port: u16, data: u8); out16(port: u16, data: u16)8 unsafe fn out16(port: u16, data: u16); out32(port: u16, data: u32)9 unsafe fn out32(port: u16, data: u32); 10 } 11