From b9cdf166caf9f874f5be19b8b85c61558e291559 Mon Sep 17 00:00:00 2001 From: bunnie Date: Wed, 19 Jun 2024 21:29:48 +0800 Subject: [PATCH] add carriage returns to the local echo --- services/xous-log/src/platform/cramium/implementation.rs | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/services/xous-log/src/platform/cramium/implementation.rs b/services/xous-log/src/platform/cramium/implementation.rs index 2704d8b79..0592be4c5 100644 --- a/services/xous-log/src/platform/cramium/implementation.rs +++ b/services/xous-log/src/platform/cramium/implementation.rs @@ -97,7 +97,12 @@ fn uart_handler(_irq_no: usize, _arg: *mut usize) { } } if unsafe { KBD_CONN != 0 } { - print!("{}", char::from_u32(c as u32).unwrap_or('.')); // local echo + let c = char::from_u32(c as u32).unwrap_or('.'); + print!("{}", c); // local echo + // naked carriage return + if c == '\r' { + println!(" "); // line feed with carriage return + } xous::try_send_message(unsafe { KBD_CONN }, xous::Message::new_scalar(0, c as usize, 0, 0, 0)) .ok(); }