rust-iot / rust-radio-sx127x

Rust driver for the Semtech SX127x series of Sub-GHz LoRa/ISM radio transceivers
Mozilla Public License 2.0
32 stars 16 forks source link

sharing spi? #46

Closed pdgilbert closed 3 years ago

pdgilbert commented 3 years ago

In theory I can put a few devices on the spi bus. However, I think lora consumes spi. Am I correct in thinking there may be a problem, or is this something I can try easily?

ryankurte commented 3 years ago

technically yes one can share an SPI device between peripherals, for bus sharing in general you can use rahix/shared-bus. however, because of the need to manage chip select as well this was unsound so is not currently available for SPI (see https://github.com/Rahix/shared-bus/issues/8)

https://github.com/rust-embedded/embedded-hal/issues/180 should resolve this but needs following up and I haven't had the time recently.

pdgilbert commented 3 years ago

Ok. Thanks. I guess I'll put experimenting with this on the back burner for awhile.