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

embedded-hal 1.0.0 and embedded-hal-async 1.0.0 support #27

Open
elpiel opened this issue Dec 27, 2023 · 3 comments
Open

embedded-hal 1.0.0 and embedded-hal-async 1.0.0 support #27

elpiel opened this issue Dec 27, 2023 · 3 comments

Comments

@elpiel
Copy link
Contributor

elpiel commented Dec 27, 2023

Hello,
I love that this crate exist and I would love to develop it further for the needs of the @AeroRust community.

I want to discuss how we could implement both rc candidates for embedded-hal and embedded-hal-async, along side the existing [email protected]

@elpiel elpiel changed the title embedded-hal 1.0.0-rc.3 and embedded-hal-async support embedded-hal 1.0.0-rc.3 and embedded-hal-async 1.0.0-rc.3 support Dec 27, 2023
@elpiel elpiel changed the title embedded-hal 1.0.0-rc.3 and embedded-hal-async 1.0.0-rc.3 support embedded-hal 1.0.0 and embedded-hal-async 1.0.0 support Jan 23, 2024
This was referenced Jan 23, 2024
@elpiel
Copy link
Contributor Author

elpiel commented Nov 14, 2024

@eupn what do you think about async support?

There are a few way of implementing this including e.g. maybe_async crate to write the code once but generate either blocking on async API, enabled by a feature.

The other option is to just duplicate the whole code and switch with async/.await and allow people to use both blocking (by default) and async (enabled with a feature) APIs.

I'd be very interested in getting this thing going as I'm working on some embassy-based flight controller implementation.
I can use a second core for the IMU blocking operations but I'd rather have async and not deal with blocking, especially for a crucial component of the control loop.

@eupn
Copy link
Owner

eupn commented Nov 25, 2024

@elpiel maybe_async sounds like a fine solution. Can't think of a scenario when someone would need to have both versions at the same time, I think it's okay to make them mutually exclusive.

@elpiel
Copy link
Contributor Author

elpiel commented Dec 7, 2024

I'll look into it and open a draft pr.

As for the exclusivity, even with it, I believe you can still add the dep. twice but with a different name and features.

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

No branches or pull requests

2 participants