Last active
April 30, 2020 12:02
-
-
Save xobs/36058c2a3ecc10b55674a2ca028c551b to your computer and use it in GitHub Desktop.
Add a flush to wishbone-tool uart
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/wishbone-tool/src/bridge/uart.rs b/wishbone-tool/src/bridge/uart.rs | |
index 0ca9c9a..daf9025 100644 | |
--- a/wishbone-tool/src/bridge/uart.rs | |
+++ b/wishbone-tool/src/bridge/uart.rs | |
@@ -239,7 +239,9 @@ impl UartBridge { | |
// LiteX ignores the bottom two Wishbone bits, so shift it by | |
// two when writing the address. | |
serial.write_u32::<BigEndian>(addr >> 2)?; | |
- Ok(serial.write_u32::<BigEndian>(value)?) | |
+ serial.write_u32::<BigEndian>(value)?; | |
+ serial.flush()?; | |
+ Ok(()) | |
} | |
fn do_peek<T: SerialPort>(serial: &mut T, addr: u32) -> Result<u32, BridgeError> { |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment