stm32-rs / stm32f7xx-hal

A Rust embedded-hal HAL for all MCUs in the STM32 F7 family
Apache License 2.0
115 stars 67 forks source link

Spi::enable takes Rcc as a parameter making it impossible to enable SPI after the clocks were frozen. #65

Closed pftbest closed 3 years ago

pftbest commented 4 years ago

I think there are 2 ways to solve this

  1. Remove the Rcc argument and access the register internally using unsafe. Serial::new does this.
  2. Split the Rcc struct, one part which configures the clock and another part which can turn on/off the peripherals.
hardfau1t commented 3 years ago

this one is resolved i guess, may be its ok to close