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

Add conversions between DataBits, StopBits and their numeric representation #159

Merged
merged 1 commit into from
Feb 15, 2024

Conversation

DNedic
Copy link
Contributor

@DNedic DNedic commented Feb 14, 2024

This implements the TryFrom and From traits for u8 and DataBits/StopBits respectively, can be useful for niche uses.

For instance, I had written an RFC2217 server implementation, and the lack of these required implementing all of these myself.

Copy link
Contributor

@eldruin eldruin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me, thank you!
Could you fix the formatting and add an entry to the changelog as well?

@DNedic DNedic force-pushed the add_bitcount_numeric_conversions branch from b634892 to c3cf94f Compare February 15, 2024 11:37
@DNedic
Copy link
Contributor Author

DNedic commented Feb 15, 2024

@eldruin Thanks for the feedback, PTAL

@DNedic DNedic force-pushed the add_bitcount_numeric_conversions branch from c3cf94f to 881af0a Compare February 15, 2024 11:38
Copy link
Contributor

@eldruin eldruin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me, thanks!

@eldruin eldruin merged commit 5d66560 into serialport:main Feb 15, 2024
27 checks passed
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