Conversation
fe08b3f to
e5af237
Compare
ryankurte
previously approved these changes
Jul 5, 2023
Contributor
ryankurte
left a comment
There was a problem hiding this comment.
approach seems reasonable and examples are solid, lgtm (and thanks for your work on this)!
eldruin
reviewed
Jul 12, 2023
Member
eldruin
left a comment
There was a problem hiding this comment.
Thank you for all your work!
This looks great to me.
Something to do after merging this would be to document how to go about something like the older serial::Write trait and how e-h and e-io fit together.
Co-authored-by: Diego Barrios Romero <eldruin@gmail.com>
Member
Author
|
adressed @eldruin 's review comments |
This was referenced Jul 12, 2023
Merged
eldruin
approved these changes
Jul 12, 2023
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
As discussed previously and in today's meeting (chatlog, minutes), we've decided to not have serial traits, in favor of a more general "io" abstraction.
This PR moves the embedded-io crate to the embedded-hal repo. The crate currently living at https://github.com/embassy-rs/embedded-io, that repo will be archived once the move is complete.
Changes from the embassy repo:
defmtimpls, needed for 1.0.embedded-ioandembedded-io-async. Needed for 1.0, so we don't have to wait for AFIT to be stable.tokioandfutures. I'm not sure if we want them here or it's better to leave them to community crates. If we do, I'll add them in a future PR.embedded-io::{ReadReady, WriteReady}. They're separate from theRead/Writetraits since they can't be trivially implemented on top ofstd::iotraits, so this would present a problem for the adapters. (It's likely implementable with e.g. some weirdpoll()/select()contraption, but that's OS-specific and I'm sure has other tradeoffs, so I'd rather not make the adapters do that by default.)The crate has been added by parts in several commits to make review easier.
The
embedded-iocrate has been around for more than 1 year, so it's somewhat "proven". The design is the same asstd::io, which is more than proven. Highlights of uses ofembedded-ioin the field (see more)embassy-nrfDMA-powered UART implembassy-stm32irq-driven UARTembassy-stm32DMA-powered UARTembassy-rpirq-driven UARTembassy-syncPipeembassy-netTcpSocketembedded-tlsTLS client, uses embedded-io to work on top of any TCP socket.reqwlessHTTP client, uses embedded-io to work on top of any TCP socket or on top ofembedded-tls.rust-mqtt, same.embedded-svcabstractions, widely used in the ESP32 ecosystem.embedded-nal-asyncmodels TCP sockets asRead+Write.es-wifi-driver, AT commands over uartesp8266-at-driver, AT commands over uart