-
Notifications
You must be signed in to change notification settings - Fork 19
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
migrate to embedded_hal 1.0 #22
base: master
Are you sure you want to change the base?
Conversation
Awesome! Thanks so much for your efforts! For the SPI, could you remove the manual handling of the chip select and the |
I can do it, except I can't really test it since SPI doesn't work for me on Esp32, so I could introduce a bug with such changes (mainly the move to transaction). Removed the cs handling, I think it's better to move the transaction on a system where it is actually running, and test before and after the change that it is working. |
@yanshay hey, thanks for your effort! I wanted to use your fork, but I saw that you have copied the |
If I recall correctly Embedded-Hal dropped CountDown prior to release of embedded-hal 1.0, I couldn't find any established alternatives. Since then, I personally moved to an async solution based on embassy and timeouts need to be implemented differently there. My end goal is to get the async implementation (for I2C I implemented it) into the repo, updating to embedded-hal 1.0 is a step in that direction. |
Yes, I understand. I have switched to i2c yesterday as well since it works better than spi. My goal is to use async too, ill try your async implementation asap |
I think I didn't submit a PR with the async version since @dimpolo wanted to take it one step at a time but if you want I can add it to the PR, I think the async version is much more valuable anyway. |
Yes I just saw the branch in your fork. Unfortunately, I had to realize that |
Any chance you could share the wrapper, I am rather new to the embedded_hal stuff and it's not super clear to me how these traits are supposed to work. |
If you refer to the CountDown, this is what I could find in my tests (I moved to async by now), for ESP32. Maybe it will help you as a starting point.
|
In my case I was lucky enough that the |
I migrated the code to use embedded_hal 1.0 .
N
as a generic const value. For now, since this isn't final I didn't do it yet.Happy for others to test it with other devices, or if anyone can get it to work with esp32 I'd be happy to know how.