-
Notifications
You must be signed in to change notification settings - Fork 185
Impl Read<u8> / Write<u8> for Serial #171
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
Conversation
Seems like a nice and simple change, good job! The last matrix message seems to suggest that you may want to make additional improvements. Is that the case or is it ready for merging? |
I couldn't figure out how to implement the change suggested by @Disasm, but maybe I misunderstood something... To me, it seems better to keep the trait methods as associated functions without a &self reference, since they actually are static and don't require a reference to an instance. |
Passing |
Well, I have an update. Should I open a PR to the dbrgn's PR or should I PR my changes here after this PR gets merged? |
If you want, you can also send me the patch ( |
Here we are: dbrgn#1 |
Thanks! I merged your changes, will add a comment. |
With this implementation only one copy of |
917d63c
to
f13e244
Compare
I rebased the branch and squashed my fixup commits. I also integrated the "Strip confusing comment" commit into the commit "Deduplicate USART driver code". From my side, this PR is now ready. |
@TheZoq2 could you review this one more time? |
Looks great, thank you both for your work! |
Oh yea, just one minor thing. Would you mind adding a changelog entry before I merge? |
f13e244
to
6dfdef3
Compare
Sure! Forgot about that. Done! |
Lovely! |
Fixes #167.
I managed to implement this without having split tx/rx pins in the
Serial
struct thanks to the help of @Disasm. Instead, it uses a private trait (UsartReadWrite
) to avoid having duplicated peripheral access logic. There should be no breaking change in this PR.