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