From cd4ea5ed173d59521abc37574bc6cd1097960203 Mon Sep 17 00:00:00 2001 From: bunnie Date: Tue, 12 Jan 2021 04:20:37 +0800 Subject: [PATCH] make the `run` variant not break --- services/keyboard/src/main.rs | 17 +++++++++++------ xtask/src/main.rs | 1 + 2 files changed, 12 insertions(+), 6 deletions(-) diff --git a/services/keyboard/src/main.rs b/services/keyboard/src/main.rs index cacb42967..283116d89 100644 --- a/services/keyboard/src/main.rs +++ b/services/keyboard/src/main.rs @@ -734,6 +734,11 @@ mod implementation { // a stub to try to avoid breaking hosted mode for as long as possible. #[cfg(not(target_os = "none"))] mod implementation { + use heapless::Vec; + use heapless::consts::*; + use crate::api::*; + use crate::{map_dvorak, map_qwerty}; + use log::{error, info}; pub struct Keyboard { map: KeyMap, @@ -757,16 +762,16 @@ mod implementation { } pub fn get_map(&self) -> KeyMap {self.map} - pub fn update() -> Option { - None + pub fn update(&self) -> ( Option>, Option> ) { + (None, None) } - pub fn track_chord(&mut self, _keyups: Option>, _keydowns: Option>) -> KeyStates { - KeyStates::new() + pub fn track_chord(&mut self, _keyups: Option>, _keydowns: Option>) -> Vec { + Vec::new() } - pub fn track_keys(&mut self, _keyups: Option>, _keydowns: Option>) -> KeyStates { - KeyStates::new() + pub fn track_keys(&mut self, _keyups: Option>, _keydowns: Option>) -> Vec { + Vec::new() } pub fn set_repeat(&mut self, rate: usize, delay: usize) { diff --git a/xtask/src/main.rs b/xtask/src/main.rs index 7b8db458a..555c50fd5 100644 --- a/xtask/src/main.rs +++ b/xtask/src/main.rs @@ -187,6 +187,7 @@ fn run(debug: bool) -> Result<(), DynError> { "ticktimer-server", "com", "xous-names", + "keyboard", ]; // let mut init_paths = vec![];