mirror of
https://github.com/saymrwulf/xous-core.git
synced 2026-11-15 08:30:02 +00:00
add a quick test shim for the keyboard emulator over USB
This commit is contained in:
parent
f96ca0ee93
commit
9a37ecc2d3
3 changed files with 14 additions and 2 deletions
|
|
@ -19,9 +19,10 @@ xous-pio = { path = "../../libs/xous-pio", optional = true }
|
|||
xous-pl230 = { path = "../../libs/xous-pl230", optional = true }
|
||||
# this is temporary, until we get GAM/modals pulled in
|
||||
graphics-server = { path = "../graphics-server" }
|
||||
modals = { path = "../modals" }
|
||||
modals = { path = "../modals", features = ["cramium-soc"] }
|
||||
gam = { path = "../gam" }
|
||||
locales = { path = "../../locales" }
|
||||
usb-device-xous = { path = "../usb-device-xous" }
|
||||
|
||||
[features]
|
||||
"cramium-fpga" = ["utralib/cramium-fpga", "xous-pl230/cramium-fpga"]
|
||||
|
|
|
|||
|
|
@ -45,8 +45,18 @@ fn main() {
|
|||
}
|
||||
});
|
||||
|
||||
let tt = xous_api_ticktimer::Ticktimer::new().unwrap();
|
||||
let xns = xous_api_names::XousNames::new().unwrap();
|
||||
|
||||
let usb = usb_device_xous::UsbHid::new();
|
||||
|
||||
tt.sleep_ms(15_000).ok();
|
||||
log::info!("sending hello world");
|
||||
usb.send_str("hello world");
|
||||
loop {
|
||||
tt.sleep_ms(1000).ok();
|
||||
}
|
||||
|
||||
let status_gam_getter =
|
||||
xns.register_name(SERVER_NAME_STATUS_GID, Some(1)).expect("can't register server");
|
||||
let mut canvas_gid: [u32; 4] = [0; 4];
|
||||
|
|
|
|||
|
|
@ -95,7 +95,8 @@ fn keyboard_service() {
|
|||
todo!();
|
||||
}
|
||||
Some(KeyboardOpcode::GetKeyMap) => msg_blocking_scalar_unpack!(msg, _, _, _, _, {
|
||||
todo!();
|
||||
log::warn!("Defaulting to DVORAK map");
|
||||
xous::return_scalar(msg.sender, KeyMap::Dvorak.into()).expect("can't retrieve keymap");
|
||||
}),
|
||||
Some(KeyboardOpcode::SetRepeat) => msg_scalar_unpack!(msg, _rate, _delay, _, _, {
|
||||
todo!();
|
||||
|
|
|
|||
Loading…
Reference in a new issue