Skip to content

add UART errors for embedded-io #665

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

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

robamu
Copy link
Contributor

@robamu robamu commented Apr 30, 2025

Related issue: #577

@robamu robamu requested a review from a team as a code owner April 30, 2025 13:47
@chrysn
Copy link
Contributor

chrysn commented Aug 2, 2025

This looks good to me if the intention around the error type is to have details perfectly suited to specific transports (that is not clear to me from its docs; those only refer to the corresponding std type).

If that is not the intention, would more abstract errors work? Overrun fits that pattern, but "FrameFormat" could be a more generic "ConfigurationMismatch" error ("In the communication with the data source/sink, the peer behaved in a way that indicates that the peers are configured differently."), "UnreliableConnection" ("The received data was internally erroneous in a way that indicates that the underlying connection is unreliable, eg. due to failing CRC or parity checks"). "Noise" can fall in either category, but then again, not all UARTs distinguish those in the first place, and it might suffice to lump them in with UnreliableConnection.

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.

2 participants