xref: /DragonOS/kernel/src/arch/io.rs (revision c635d8a9cfe25bc11779f323ef0c7d7a0f597d4a)
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 }
11