-
Notifications
You must be signed in to change notification settings - Fork 233
Bit banging SPI implementation #42
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
I love the idea of having bit-banged implementations of common serial protocols -- but does it make sense in this this crate? My understanding is that I also think the API bears careful thinking on. Instead of a standalone function, it should probably be a type implementing the Perhaps something like |
👍 though I would probably put
I also think it should be a (generic) type implementing the SPI trait(s). Then it can be used with SPI based driver crates. |
I've proposed Wave generation trait. Could this be implemented on top of that trait or should it be different? Obviously, receiving end will need something else, but it doesn't conflict with transmitting. |
As stated above, there is a working bitbanging SPI implementation in the bitbang-hal. |
It's been a while for me, but I think this issue can be closed indeed. |
42: Update gpio-cdev and add MSRV r=posborne a=eldruin Using `gpio-cdev` 0.3 we have a MSRV of 1.36.0 due to `nix`. This superseeds rust-embedded#41 Co-authored-by: Diego Barrios Romero <[email protected]>
The README.md was previously updated due to the dependency on `nix` with PR rust-embedded#42
For my MAX7219 crate I've translated the shiftOut function from the Arduino platform to rust, in order to aid with bit-banged serial transfer.
As proposed at rust-embedded/wg#39 (comment), it might be an idea to move this function to the embedded-hal crate.
I am willing to send a PR to move this to the embedded-hal crate, and extend the implementation to be on par with the Arduino one (https://github.com/arduino/Arduino/blob/master/hardware/arduino/avr/cores/arduino/wiring_shift.c#L40).
But before I make the PR, I'd like to check if there are any objections/ideas/comments regarding this, so here's what I was thinking:
shift_out
instead ofshiftOut
.use embedded_hal::spi::shift_out
.shiftIn
function is for another time and PR.For reference, my current implementation lives here: https://github.com/maikelwever/max7219/blob/master/src/lib.rs#L127
The text was updated successfully, but these errors were encountered: