-
Notifications
You must be signed in to change notification settings - Fork 24
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
Implement embedded_hal_async::spi #49
Conversation
9ab4b8c
to
4effcd0
Compare
hmm, seems good to me! i wonder whether it'd be useful to share the expectations for sync / async so when you're testing drivers if you were to have both interfaces you could use the same set of vectors? or alternately, whether there's a particular advantage to having separate sync / async expectations? |
This was one of the design decisions I wasn't sure about, I can see arguments for both, being specific vs having portable testcases. Do you have a preference towards one or the other? I'm leaning more more towards shared expectations now that I think about it more, but I don't feel strongly about it. |
i think same, it'd be nice to be able to run the same tests for both (if we end up having to do this in drivers), and if we need to be able to describe async expectations specifically we can probably expand that later |
This is ready now, if anyone wants to see it in action I have doctests for bme280-multibus |
looks good to me! imo sometimes it's nice to have an explicit |
@newAM thanks for your contribution!
I agree, that would be good. Could be used explicitly in CI with @ryankurte I don't really have much experience with SPI. Feel free to merge if you think the PR looks OK (once the CI issue is resolved)! |
Good point, that is handy! Done. |
@newAM can you rebase against master? |
I pushed this, and also squashed the commits here down to a single commit. It's going to look weird on GitHub because it rebases all commits made to |
I went to use this again and noticed the rebase took some changes from For now I reverted this to just the commit to add async SPI. |
dd52541
to
cabd41c
Compare
Any chance to get this PR going? |
Another option is that I could add support for both the 0.2 HAL and the 1.0 alpha HAL in the same branch, removing the need for separate master/1-alpha branches. Happy to implement any of these pending feedback! |
Sound good to me 🙌 |
Sorry for the delay, this fell off my radar. I'm quite busy at the moment (planning to move to a new place), but will try to take a look at the PR soon-ish. If I forget about it, don't hesitate to post a reminder comment 🙂 |
Is not a good time for a reminder @dbrgn ? 😋 |
This should probably go in after #66 so I can update to the latest async HAL |
Should be good to go now. I also pinned nightly to 2023-04-10 since there's an ICE in newer nightlies at the moment. |
Thank you for updating the PR @newAM |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Finally, thanks for the patience!
I have barely any experience with SPI and none with embedded-hal-async, but the code looks good overall and both @ryankurte and @elpiel gave positive feedback, so let's get this merged 🙂
This is a draft because I wanted to get feedback on the implementation before filling out the tests.