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

Fix off-by-one error in Delay impl #237

Merged
merged 1 commit into from Jun 15, 2021
Merged

Conversation

jamesmunns
Copy link
Contributor

This makes two changes:

  • Updates the MAX_RVR to a 24-bit (not 25-bit) number
  • Moves tracking variable update for better potential precision

This brings the stm32f3 delay impl up to date with the nrf52 delay impl.

@sirhcel
Copy link
Contributor

sirhcel commented Jun 12, 2021

@Sh3Rm4n, this change works a treat on top of my sirhcel@2a9b8f7. Isn't this something for the next release as well?

@Sh3Rm4n
Copy link
Member

Sh3Rm4n commented Jun 15, 2021

Thanks @jamesmunns! This for fixing this bug and keeping this HAL implementation up to date with the other implementations.

Only rustfmt is unhappy, so this PR is almost good to go. I can fix this myself, if you don't mind though :)

This makes two changes:

* Updates the MAX_RVR to a 24-bit (not 25-bit) number
* Moves tracking variable update for better potential precision

This brings the stm32f3 delay impl up to date with the [nrf52 delay impl](https://github.com/nrf-rs/nrf-hal/blob/master/nrf-hal-common/src/delay.rs#L46-L72).
@Sh3Rm4n Sh3Rm4n merged commit 74fd875 into stm32-rs:master Jun 15, 2021
Sh3Rm4n referenced this pull request in sirhcel/stm32f3xx-hal Jun 16, 2021
This struct could be converted from a Baud value already used in
exisiting code and should therefor not break it.
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.

None yet

3 participants