Open honzasp opened 3 months ago
Marked as draft because I need to rebase and do more thorough testing before I'm comfortable merging this.
The CI passes and I confirmed that the timer examples work on my STM32H743ZI Nucleo board, so this should be ready for review. (But we need to wait for https://github.com/embassy-rs/stm32-data/pull/495 to land first.)
@Dirbaio, do you think you will have time to look at this PR? :)
This PR is a refactor of the timer functionality in embassy-stm32 that attempts to address two problems with the current implementation:
The approach that I took is described in the doc comment for the
timer
module. The foundation for type-safe timers is thetimer::raw::RawTimer
driver, which provides access only to the timer registers and their fields that are supported by the given timer.