mciantyre / teensy4-rs

Rust support for the Teensy 4
Apache License 2.0
271 stars 31 forks source link

Make clock_power and its setup public #146

Closed burgerindividual closed 11 months ago

burgerindividual commented 11 months ago

I'm currently working on a project that requires very low-level access to peripherals. Because of this, I'm mostly working with the RAL and HAL, rather than the BSP. However, I don't want to have to configure all of the clock settings myself, and would like to let the BSP take care of this for me. Unfortunately, to do that, It's currently required to provide the raw peripheral instances over to the BSP, which causes an ownership transfer that I don't want to do.

Giving access to this function allows driver creators to let the teensy's clocks be set up easily, while still providing low-level access to everything else.

mciantyre commented 11 months ago

We can support this. I prefer to expose the API through the board module, since board re-exports parts of clock_power and contains all the user docs.

mciantyre commented 11 months ago

Released in 0.4.4.