mirror of
https://github.com/italicsjenga/rp-hal-boards.git
synced 2025-01-10 04:21:32 +11:00
Change pio::Tx::write to write u32 instead of <T>* (#352)
* Change pio::Tx::write to write u32 instead of <T>* * Use i2c-pio branch that supports new SIO FIFO API so the PIO FIFO changes don't break CI
This commit is contained in:
parent
9bce594db2
commit
9641c0b4a4
|
@ -26,7 +26,7 @@ panic-halt= "0.2.0"
|
||||||
embedded-hal ="0.2.5"
|
embedded-hal ="0.2.5"
|
||||||
cortex-m-rtic = "0.6.0-rc.4"
|
cortex-m-rtic = "0.6.0-rc.4"
|
||||||
nb = "1.0"
|
nb = "1.0"
|
||||||
i2c-pio = { git = "https://github.com/ithinuel/i2c-pio-rs", rev = "fa155bbae4e8553b448a66cc47236db38b7524dd" }
|
i2c-pio = { git = "https://github.com/rp-rs/i2c-pio-rs", branch = "pio_write_widths" }
|
||||||
heapless = "0.7.9"
|
heapless = "0.7.9"
|
||||||
embedded-sdmmc = { git = "https://github.com/rust-embedded-community/embedded-sdmmc-rs.git" }
|
embedded-sdmmc = { git = "https://github.com/rust-embedded-community/embedded-sdmmc-rs.git" }
|
||||||
smart-leds = "0.3.0"
|
smart-leds = "0.3.0"
|
||||||
|
|
|
@ -1183,10 +1183,10 @@ impl<SM: ValidStateMachine> Tx<SM> {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Write an element to TX FIFO.
|
/// Write a u32 value to TX FIFO.
|
||||||
///
|
///
|
||||||
/// Returns `true` if the value was written to FIFO, `false` otherwise.
|
/// Returns `true` if the value was written to FIFO, `false` otherwise.
|
||||||
pub fn write<T>(&mut self, value: T) -> bool {
|
pub fn write(&mut self, value: u32) -> bool {
|
||||||
// Safety: The register is never written by software.
|
// Safety: The register is never written by software.
|
||||||
let is_full = self.is_full();
|
let is_full = self.is_full();
|
||||||
|
|
||||||
|
@ -1195,8 +1195,8 @@ impl<SM: ValidStateMachine> Tx<SM> {
|
||||||
}
|
}
|
||||||
|
|
||||||
unsafe {
|
unsafe {
|
||||||
let reg_ptr = self.register_block().txf[SM::id()].as_ptr() as *mut T;
|
let reg_ptr = self.register_block().txf[SM::id()].as_ptr() as *mut u32;
|
||||||
core::ptr::write_volatile(reg_ptr, value);
|
reg_ptr.write_volatile(value);
|
||||||
}
|
}
|
||||||
|
|
||||||
true
|
true
|
||||||
|
|
Loading…
Reference in a new issue