Skip to content
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

Update to embedded-hal 1.0.0-alpha.8 and add optional support for embedded-hal-async #23

Merged
merged 2 commits into from
Jan 16, 2023

Conversation

quentinmit
Copy link
Contributor

Note that the example won't compile until stm32-rs/stm32f4xx-hal#510 is merged, since they use stm32f4xx-hal and it's currently on 1.0.0-alpha.7 (not that it seemingly compiles out of the box, anyway). Not sure what to do before that's merged (block merging this, I guess?).

@VersBinarii
Copy link
Owner

Thank you for this. I think i will wait for the next release of the stm32f4xx-hal before merging this.
Could you please provide an example for the async code usage?

@quentinmit
Copy link
Contributor Author

Thank you for this. I think i will wait for the next release of the stm32f4xx-hal before merging this. Could you please provide an example for the async code usage?

Hm, stm32f4xx-hal doesn't implement the embedded-hal-async traits yet. What HAL should I write an example against? The most popular async HAL for stm32 would be embassy-stm32, but that's still fairly unstable (and would require a pinned crate patch). Or would you prefer an example that doesn't actually compile? (Other than adding some .await calls, the async code would be identical, anyway.)

@VersBinarii
Copy link
Owner

Yes, exactly, async with embedded is quite new. TBH the only embedded async executor i'm aware of is embassy but i know nothing more about it beyond that. So i guess i was asking in this convoluted way if you could whip out some quick example of how to use the async stuff with whatever is currently out there. I was just wondering what you would use the async version of this crate for yourself 😀. But dont worry about it if its too much hassle 😉

@quentinmit
Copy link
Contributor Author

Yes, exactly, async with embedded is quite new. TBH the only embedded async executor i'm aware of is embassy but i know nothing more about it beyond that. So i guess i was asking in this convoluted way if you could whip out some quick example of how to use the async stuff with whatever is currently out there. I was just wondering what you would use the async version of this crate for yourself 😀. But dont worry about it if its too much hassle 😉

If that's all you're looking for you're welcome to look at the code I already wrote using it :)

https://github.com/quentinmit/discobike/blob/main/discobiker/src/actors/barometer.rs

I've been rewriting the code for my bike in Rust... yes, I know it's ridiculous to have 5kloc and counting for some LEDs... :)

@VersBinarii
Copy link
Owner

Thanks for the link. I have been meaning to try out embassy for some time.
Cheers 👍🏻

yes, I know it's ridiculous to have 5kloc and counting for some LEDs... :)

A sure, you gotta do what you gotta do 😉 .
I used to pimp my wheels with he "phantom texts" running on the 8bit PIC chips. Tons of fun 😄

@VersBinarii VersBinarii merged commit 051071f into VersBinarii:master Jan 16, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants