stm32f7xx-hal icon indicating copy to clipboard operation
stm32f7xx-hal copied to clipboard

Decide on consistent strategy for enabling peripherals

Open hannobraun opened this issue 4 years ago • 0 comments

@burrbull wrote this in https://github.com/stm32-rs/stm32f7xx-hal/pull/152#issuecomment-956156269:

I would say you need to decide what API you want. Now all peripheral init functions are different. Some take &mut APBx, other &mut Rcc. Some take nothing and make peripheral enable in unsafe, other in interrupt::free mode.

My reply in https://github.com/stm32-rs/stm32f7xx-hal/pull/152#issuecomment-957276958:

Not sure, to be honest. It's been a while since I actually used this HAL, or worked on the design of a STM32 HAL, or really thought about the design of STM32 HALs.

It would be better if it was consistent, of course, but I don't know which of the options is best. Suggestions welcome!

hannobraun avatar Nov 03 '21 10:11 hannobraun