1*a03c4f9dSLoGin /// 每个架构都需要实现的IO接口 2*a03c4f9dSLoGin pub trait PortIOArch { 3*a03c4f9dSLoGin unsafe fn in8(port: u16) -> u8; 4*a03c4f9dSLoGin unsafe fn in16(port: u16) -> u16; 5*a03c4f9dSLoGin unsafe fn in32(port: u16) -> u32; 6*a03c4f9dSLoGin unsafe fn out8(port: u16, data: u8); 7*a03c4f9dSLoGin unsafe fn out16(port: u16, data: u16); 8*a03c4f9dSLoGin unsafe fn out32(port: u16, data: u32); 9*a03c4f9dSLoGin } 10