-
Notifications
You must be signed in to change notification settings - Fork 549
Fix and clean up 11-usart by bumping dependencies #354
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
This issue got fixed with stm32f3 0.13.1 and writing to TDR is safe again. This prepares updating the dependencies to actually use this release.
MonoTimer is used by 11-usart's aux11 module and the buffer-overrun solution. It got deprecated after stm32f3xx-hal release 0.6.1. This is a copy of https://github.com/stm32-rs/stm32f3xx-hal/blob/c68c36c03e0e33699b3b0c9acc3f8d80f5a25cd4/src/time.rs#L91 minus the time units which can be used from embedded-time.
When running 'mdbook test' on the book the example code checking fails to handle for example macros like '#[entry]' and the local auxiliary crates. Having most code examples included from 'examples/' allows to check them at least with 'cargo build --target thumbv7em-none-eabihf --examples'.
Updating stm32f3xx-hal makes accessing these registers safe as it should be.
r? @adamgreig (rust-highfive has picked a reviewer for you, use r? to override) |
Amazing, thank you for pushing this through all the various crates! I'll add CI testing of the examples in a separate PR. bors merge |
👎 Rejected by too few approved reviews |
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.
bors merge
It was a pleasure and a very interesting journey. :)
Awesome! Thank you! |
This is an alternate version of #267 which fixes the panic by bumping dependencies. It also addresses the previously unsafe access to the USARTs transmit and receive data registers (TDR and RDR, stm32-rs/stm32-rs#558) by bumping the BSP to the brand spanking new release 0.7.0 which comes with a fixed PAC and HAL. Thank you very much @adamgreig, @Sh3Rm4n, and @rubberduck203 for your patience and support along this journey!
This PR also bumps non-critical dependencies to their actual releases. For example
heapless
, which makes use of const generics nowadays.I did not succeed in getting
mdbook test
to actually check the example code. I moved it over to theexamples
directory and included it in the Markdown files so that it can be checked withcargo build --target thumbv7em-none-eabihf --examples
.