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