diff --git a/services/usb-device-xous/Cargo.toml b/services/usb-device-xous/Cargo.toml index 1c41e60c9..04fdebabc 100644 --- a/services/usb-device-xous/Cargo.toml +++ b/services/usb-device-xous/Cargo.toml @@ -41,6 +41,6 @@ rand_chacha = "0.3.1" utralib = { path = "../../utralib"} [features] -keyboard = [] # handy for debugging composite device issues +emukbd = [] # handy for debugging composite device issues mjolnir = [] # the big hammer for debugging Spinal USB issues. A raw memory dump of config and descriptor space. Use with care. -default = ["keyboard"] +default = ["emukbd"] diff --git a/services/usb-device-xous/src/main.rs b/services/usb-device-xous/src/main.rs index 9f4a2496c..4fb4ad8a7 100644 --- a/services/usb-device-xous/src/main.rs +++ b/services/usb-device-xous/src/main.rs @@ -142,7 +142,7 @@ fn main() -> ! { let usb_alloc = UsbBusAllocator::new(usbdev); #[cfg(any(target_os = "none", target_os = "xous"))] let clock = EmbeddedClock::new(); - #[cfg(all(any(target_os = "none", target_os = "xous"), feature="keyboard"))] + #[cfg(all(any(target_os = "none", target_os = "xous"), feature="emukbd"))] let mut composite = UsbHidClassBuilder::new() .add_interface( NKROBootKeyboardInterface::default_config(&clock), @@ -151,7 +151,7 @@ fn main() -> ! { FidoInterface::default_config() ) .build(&usb_alloc); - #[cfg(all(any(target_os = "none", target_os = "xous"), not(feature="keyboard")))] + #[cfg(all(any(target_os = "none", target_os = "xous"), not(feature="emukbd")))] let mut composite = UsbHidClassBuilder::new() .add_interface( FidoInterface::default_config() @@ -164,7 +164,7 @@ fn main() -> ! { .product("Precursor") .serial_number(&serial_number) .build(); - #[cfg(all(any(target_os = "none", target_os = "xous"), feature="keyboard"))] + #[cfg(all(any(target_os = "none", target_os = "xous"), feature="emukbd"))] { let keyboard = composite.interface::, _>(); keyboard.write_report(&Vec::::new()).ok(); @@ -246,7 +246,7 @@ fn main() -> ! { Some(Opcode::UsbIrqHandler) => { #[cfg(any(target_os = "none", target_os = "xous"))] if usb_dev.poll(&mut [&mut composite]) { - #[cfg(feature="keyboard")] + #[cfg(feature="emukbd")] { let keyboard = composite.interface::, _>(); match keyboard.read_report() { @@ -361,7 +361,7 @@ fn main() -> ! { codes.push(Keyboard::from_primitive(code2 as u8)); } let auto_up = if autoup == 1 {true} else {false}; - #[cfg(feature="keyboard")] + #[cfg(feature="emukbd")] { let keyboard = composite.interface::, _>(); keyboard.write_report(&codes).ok(); @@ -397,7 +397,7 @@ fn main() -> ! { KeyMap::Dvorak => mappings::char_to_hid_code_dvorak(ch), _ => mappings::char_to_hid_code_us101(ch), }; - #[cfg(feature="keyboard")] + #[cfg(feature="emukbd")] { let keyboard = composite.interface::, _>(); keyboard.write_report(&codes).ok();