From 6f8590e4e71a2397fe7dce61e458dec6e491334f Mon Sep 17 00:00:00 2001 From: bunnie Date: Wed, 8 Jun 2022 04:37:08 +0800 Subject: [PATCH] fixup config flags on keyboard option --- services/keyboard/src/main.rs | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/services/keyboard/src/main.rs b/services/keyboard/src/main.rs index 2b882b951..9c806ae9d 100644 --- a/services/keyboard/src/main.rs +++ b/services/keyboard/src/main.rs @@ -791,8 +791,9 @@ fn main() -> ! { else { vibe = false } }), Some(Opcode::BlockingKeyListener) => { + #[cfg(feature="rawserial")] if blocking_queue.len() != 0 { - // we have a pending byte in the queue, return it + // we have a pending byte in the queue, return it. let k_prime = blocking_queue.pop_front().unwrap(); xous::return_scalar2(msg.sender, k_prime, 0).unwrap(); } else { @@ -800,10 +801,7 @@ fn main() -> ! { // the sender will remain blocked until the return value is generated blocking_listener.push(msg.sender); } - }, - Some(Opcode::BlockingKeyListener) => { - // by simply storing the sender address and not returning a value, - // the sender will remain blocked until the return value is generated + #[cfg(not(feature="rawserial"))] blocking_listener.push(msg.sender); }, Some(Opcode::RegisterListener) => {