make the run variant not break

This commit is contained in:
bunnie 2021-01-12 04:20:37 +08:00
parent 426c747f8f
commit cd4ea5ed17
2 changed files with 12 additions and 6 deletions

View file

@ -734,6 +734,11 @@ mod implementation {
// a stub to try to avoid breaking hosted mode for as long as possible. // a stub to try to avoid breaking hosted mode for as long as possible.
#[cfg(not(target_os = "none"))] #[cfg(not(target_os = "none"))]
mod implementation { mod implementation {
use heapless::Vec;
use heapless::consts::*;
use crate::api::*;
use crate::{map_dvorak, map_qwerty};
use log::{error, info};
pub struct Keyboard { pub struct Keyboard {
map: KeyMap, map: KeyMap,
@ -757,16 +762,16 @@ mod implementation {
} }
pub fn get_map(&self) -> KeyMap {self.map} pub fn get_map(&self) -> KeyMap {self.map}
pub fn update() -> Option<KeyStates> { pub fn update(&self) -> ( Option<Vec<RowCol, U16>>, Option<Vec<RowCol, U16>> ) {
None (None, None)
} }
pub fn track_chord(&mut self, _keyups: Option<Vec<RowCol, U16>>, _keydowns: Option<Vec<RowCol, U16>>) -> KeyStates { pub fn track_chord(&mut self, _keyups: Option<Vec<RowCol, U16>>, _keydowns: Option<Vec<RowCol, U16>>) -> Vec<char, U4> {
KeyStates::new() Vec::new()
} }
pub fn track_keys(&mut self, _keyups: Option<Vec<RowCol, U16>>, _keydowns: Option<Vec<RowCol, U16>>) -> KeyStates { pub fn track_keys(&mut self, _keyups: Option<Vec<RowCol, U16>>, _keydowns: Option<Vec<RowCol, U16>>) -> Vec<char, U4> {
KeyStates::new() Vec::new()
} }
pub fn set_repeat(&mut self, rate: usize, delay: usize) { pub fn set_repeat(&mut self, rate: usize, delay: usize) {

View file

@ -187,6 +187,7 @@ fn run(debug: bool) -> Result<(), DynError> {
"ticktimer-server", "ticktimer-server",
"com", "com",
"xous-names", "xous-names",
"keyboard",
]; ];
// let mut init_paths = vec![]; // let mut init_paths = vec![];