-
Notifications
You must be signed in to change notification settings - Fork 520
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
07-uart code refactor #583
07-uart code refactor #583
Conversation
…dded_hal_nb and embedded_hal_io libraries
This PR helped me to overcome compilation errors from the book. I think it is nice to merge it sooner then later. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks reasonable, thanks for the update!
cc @BartMassey in case some of this needs to be incorporated into the mb2 version. |
@jamesmunns Thanks! I've been following this, but haven't got around to responding yet. I already rewrote the serial stuff for Discovery MB2, but I'll look at these commits and see what I can figure out. @humb1t Thanks much for the PR! |
Thanks @BartMassey - the author is @A-Young-Git, so I will forward your thanks to him) |
Oops. Thanks for the correction. |
Context: With recent updates to Rust’s embedded libraries, compatibility issues arose due to older versions of embedded-hal and associated dependencies. This refactor updates the project to utilize the latest libraries, ensuring both compatibility and enhanced functionality.
Key Refactoring Points:
This update aligns the project with the latest embedded-hal standards, enhancing future compatibility and maintaining consistency with the broader embedded Rust ecosystem.
use embedded_hal_nb::nb;
use embedded_hal_nb::serial::{Error as SerialError, ErrorType, Read, Write};
use embedded_io::{Read as EmbeddedIoRead, Write as EmbeddedIoWrite};
This change improves the handling of memory addresses, ensuring a more robust and maintainable codebase, especially in the context of embedded programming where direct memory manipulation is common.
These updates ensure compatibility with recent Rust releases and align with the latest improvements in the ecosystem.