1 use crate::init::initcall::INITCALL_LATE; 2 use core::ffi::c_void; 3 use system_error::SystemError; 4 use unified_init::macros::unified_init; 5 6 pub mod ps2_keyboard; 7 // pub mod ps2_keyboard_inode; 8 9 extern "C" { 10 fn ps2_keyboard_init() -> c_void; 11 } 12 13 /// 初始化ps2键盘 14 /// 15 /// todo: 将ps2键盘适配到设备驱动模型后,把初始化时机改为INITCALL_DEVICE 16 /// 17 /// 当前是LATE的原因是键盘驱动的TypeOneFSM需要在tty设备初始化之后才能工作。 18 #[unified_init(INITCALL_LATE)] 19 fn rs_ps2_keyboard_init() -> Result<(), SystemError> { 20 unsafe { 21 ps2_keyboard_init(); 22 } 23 return Ok(()); 24 } 25