Skip to content

Conversation

@usbalbin
Copy link
Member

@usbalbin usbalbin commented Apr 21, 2023

This first started with me trying to implement rtc for this crate by stealing it from stm32g0xx-hal. I noticed there were some differences.

This PR changes the time related types to use fugit to make the crate a bit more consistent with stm32g0xx-hal.

Is this at all something we want?

(Not at all tested on real hardware yet) - Some testing done

@@ -1,170 +1,114 @@
use core::ops::{Add, Div};
pub use fugit::{
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The contents of this file is now more or less identical with the one from stm32g0xx-hal

impl CountDown for CountDownTimer<SYST> {
type Time = Hertz;
impl embedded_hal::timer::CountDown for CountDownTimer<SYST> {
type Time = MicroSecond;
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I realize Hertz -> MicroSecond is quite a big change, it felt more natural in my mind. However I am fine with reverting that...

This was referenced May 20, 2023
Draft
usbalbin added a commit to usbalbin/stm32g4xx-hal that referenced this pull request Jun 7, 2023
* Use fugit for time related types to make the crate more consistent with stm32g0xx-hal

* fmt
@usbalbin usbalbin marked this pull request as ready for review June 13, 2023 06:14
@usbalbin
Copy link
Member Author

Any thoughts on this? Is this something that is wanted or should I close this PR?

Also please let me know if you want me to change anything :)

@no111u3 no111u3 merged commit 3745609 into stm32-rs:main Nov 27, 2023
@usbalbin
Copy link
Member Author

Thanks a lot :) @no111u3

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.

2 participants