Closed BlinkyStitt closed 3 years ago
This occurs because we rely on a custom re-implementation of the embedded-hal traits for the "proxy-bus" CommonBus<Bus>
. Right now, it only implements e-h::blocking::spi::Transfer
and e-g::blocking::spi::Write
. We can likely extend it to also implement e-h::spi::FullDuplex
as well.
I've been using this primarily for i2c devices, where the landscape of e-h traits is much simpler at the moment. Let me see if I can get a branch going
@WyseNynja Would you mind trying out the feature/spi-full-duplex
branch?
Edit your Cargo.toml
[dependencies.shared-bus-rtic]
git = "https://github.com/ryan-summers/shared-bus-rtic"
branch = "feature/spi-full-duplex"
Let me know if that fixes things for you. If it does, we can merge and cut a new release.
Thank you! I think it is working. At the very least it compiles. I don't currently have hardware setup to test this though. I will in the next few weeks.
Hello! This crate looks like exactly what I need!
I have this crate working with radio-sx127x, but I'm having trouble with embedded-sdmmc.
If I pass
my_spi
directly instead of usingshared_spi_manager.acquire()
, embedded_sdmmc is happy, but I need the bus to be shared. Here's my (very novice) repo: https://github.com/WyseNynja/smart-compassAnd here's the relevant code in
main.rs
:The radio only requires
Spi: _embedded_hal_blocking_spi_Transfer<u8, Error = SpiError> + _embedded_hal_blocking_spi_Write<u8, Error = SpiError>
and not FullDuplex.I checked
Cargo.lock
and I only have one version of embedded-hal (0.2.4).Possibly related: I'm currently using a feather_m0 (because it's what I have), but I'm thinking it would be better to use a STM32F3DISCOVERY like they use in the rust embedded book. I don't think this is the problem though because it is working without shared-bus.