Repository navigation
Conversation
|
Thanks for the pull request, and welcome! The Rust team is excited to review your changes, and you should hear from @therealprof (or someone else) soon. If any changes to this PR are deemed necessary, please add them as extra commits. This ensures that the reviewer can see what has changed since they last reviewed the code. Due to the way GitHub handles out-of-date commits, this should also make it reasonably obvious what issues have or haven't been addressed. Large or tricky changes may require several passes of review and changes. Please see the contribution instructions for more information. |
|
Thank you for tackling this issue. |
|
I see now that this function should be able to be called from tx and rx. But since they don't hold any reference to registers I'll leave this as a draft for now. |
This trait lets the implementer choose the type for
Baudrateas this is done in different ways in different crates.Returning a result lets the implementer sort out bad, incompatible or impossible bauds, or simply return an unsupported error.
An implementation can be seen at stm32l4xx-hal/feature/change-baud/
In this implementation the clock freq is saved with the
Uartstruct, and the used to change the baud. If the clock frequency were to change the Uart would have to be reinitialized anyway.