adamgreig / stm32ral

Register access layer in Rust for all STM32 microcontrollers
Apache License 2.0
34 stars 7 forks source link

Better timer hierarchy or structure #6

Open adamgreig opened 5 years ago

adamgreig commented 5 years ago

As per README.

Most peripherals combine well, for instance GPIOA through GPIOK are all instances of gpio::RegisterBlock. The same applies to most other peripherals like USART, SPI, I2C, and so on.

Timers are not well merged because their hierarchy is complicated: we can't just have a single TIM since there are so many different register blocks, but the solution at the moment (no merging) is not optimal either.

Ideally we might identify the various categories, such as:

We could then try to group those together.