From f780ab3ff69c7579e0dbe4ba209cb08ad4b819a4 Mon Sep 17 00:00:00 2001 From: Berkus Decker Date: Thu, 7 Mar 2019 20:41:08 +0200 Subject: [PATCH] [wip] Start implementing RTT input --- src/jlink_rtt.rs | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/src/jlink_rtt.rs b/src/jlink_rtt.rs index 501605a..46a15b9 100644 --- a/src/jlink_rtt.rs +++ b/src/jlink_rtt.rs @@ -129,6 +129,11 @@ impl Buffer { true } + + // Fill in buf + fn read(&mut self, buf: &mut [u8], blocking: bool) -> bool { + true + } } /// The ControlBlock is the magic struct that the JLINK looks @@ -232,6 +237,13 @@ impl crate::devices::ConsoleOps for Output { let s = c.encode_utf8(&mut buf); self.puts(s); } + + fn getc(&self) -> char { + ' ' + // _SEGGER_RTT.down.read(true) + } + + fn flush(&self) {} // @todo wait for write buffer to drain } impl fmt::Write for Output {