io.rs 324 B

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