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

Async/Blocking impls #2

Open
elpiel opened this issue May 18, 2024 · 0 comments
Open

Async/Blocking impls #2

elpiel opened this issue May 18, 2024 · 0 comments
Labels
enhancement New feature or request

Comments

@elpiel
Copy link
Member

elpiel commented May 18, 2024

Let's use a single interface and implement different Modes on the same struct depending on the passed Read instance.

As an example, you can take a look at https://docs.embassy.dev/embassy-rp/git/rp2040/spi/struct.Spi.html
Although the use case is a bit different (implementing the SPI driver at hal level) we can use the exact same approach with Blocking / Async modes and use the same struct with 2 different (or more, see #1 ) implementations.

@elpiel elpiel added the enhancement New feature or request label May 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant