esp-rs / esp32-hal

A hardware abstraction layer for the esp32 written in Rust.
Apache License 2.0
192 stars 28 forks source link

Add rtc_clk module #7

Closed jeandudey closed 4 years ago

jeandudey commented 4 years ago

This code gathers the CPU frequency configuration from the ESP32 registers. This code is based on top of the ESP-IDF rtc_clk_cpu_freq_get_config function .

This might be needed to calculate I2C clock speeds and such.


This is untested, it's a proof of concept. Depends on the changes to RTCCNTL.

arjanmels commented 4 years ago

@jeandudey I included all functionality in pull request #11. If that one is merged, can this one then be dropped?

jeandudey commented 4 years ago

Yes, I forgot to close this before :wink: