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.
#[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<KeyStates> {
None
pub fn update(&self) -> ( Option<Vec<RowCol, U16>>, Option<Vec<RowCol, U16>> ) {
(None, None)
}
pub fn track_chord(&mut self, _keyups: Option<Vec<RowCol, U16>>, _keydowns: Option<Vec<RowCol, U16>>) -> KeyStates {
KeyStates::new()
pub fn track_chord(&mut self, _keyups: Option<Vec<RowCol, U16>>, _keydowns: Option<Vec<RowCol, U16>>) -> Vec<char, U4> {
Vec::new()
}
pub fn track_keys(&mut self, _keyups: Option<Vec<RowCol, U16>>, _keydowns: Option<Vec<RowCol, U16>>) -> KeyStates {
KeyStates::new()
pub fn track_keys(&mut self, _keyups: Option<Vec<RowCol, U16>>, _keydowns: Option<Vec<RowCol, U16>>) -> Vec<char, U4> {
Vec::new()
}
pub fn set_repeat(&mut self, rate: usize, delay: usize) {

View file

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