mirror of
https://github.com/espressif/esp-idf.git
synced 2025-08-19 15:59:08 +00:00
soc/rtc: add function to convert CPU frequency in MHz to rtc_cpu_freq_t
This commit is contained in:
@@ -315,6 +315,14 @@ rtc_cpu_freq_t rtc_clk_cpu_freq_get();
|
||||
*/
|
||||
uint32_t rtc_clk_cpu_freq_value(rtc_cpu_freq_t cpu_freq);
|
||||
|
||||
/**
|
||||
* @brief Get rtc_cpu_freq_t enum value for given CPU frequency
|
||||
* @param cpu_freq_mhz CPU frequency, one of 80, 160, 240, 2, and XTAL frequency
|
||||
* @param[out] out_val output, rtc_cpu_freq_t value corresponding to the frequency
|
||||
* @return true if the given frequency value matches one of enum values
|
||||
*/
|
||||
bool rtc_clk_cpu_freq_from_mhz(int cpu_freq_mhz, rtc_cpu_freq_t* out_val);
|
||||
|
||||
/**
|
||||
* @brief Store new APB frequency value into RTC_APB_FREQ_REG
|
||||
*
|
||||
|
Reference in New Issue
Block a user