Skip to content

Instantly share code, notes, and snippets.

@xobs
Last active April 30, 2020 12:02
Show Gist options
  • Save xobs/36058c2a3ecc10b55674a2ca028c551b to your computer and use it in GitHub Desktop.
Save xobs/36058c2a3ecc10b55674a2ca028c551b to your computer and use it in GitHub Desktop.
Add a flush to wishbone-tool uart
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