esp-rs / esp-hal

no_std Hardware Abstraction Layers for ESP32 microcontrollers
https://docs.esp-rs.org/esp-hal/
Apache License 2.0
667 stars 189 forks source link

RFC: Provide consistent APIs for configuring clock sources for peripheral drivers #1668

Open jessebraham opened 2 months ago

jessebraham commented 2 months ago

From this project's inception we've just been hard-coding the clock source for peripheral drivers (usually just using the default clock source). This has been done just to keep things simple. We've reached the point that I feel we should start thinking more about this. I think it should not be too difficult to provide consistent APIs for configuring clock sources.

(I have not thought about this much (or at all, really) yet but I will update this comment once I have a better idea of what we should actually do about this)

playfulFence commented 1 month ago

I guess conceptually it should be something like https://github.com/esp-rs/esp-hal/pull/1416, right?