esp_clk.h: add esp_clk_xtal_freq

This adds a user API for getting the XTAL frequency
This commit is contained in:
Ivan Grokhotkov
2018-07-29 09:34:49 +03:00
parent ccd0c61ea1
commit 05a5410033
2 changed files with 18 additions and 2 deletions

View File

@@ -62,6 +62,17 @@ int esp_clk_cpu_freq(void);
*/
int esp_clk_apb_freq(void);
/**
* @brief Return frequency of the main XTAL
*
* Frequency of the main XTAL can be either auto-detected or set at compile
* time (see CONFIG_ESP32_XTAL_FREQ_SEL sdkconfig option). In both cases, this
* function returns the actual value at run time.
*
* @return XTAL frequency, in Hz
*/
int esp_clk_xtal_freq(void);
/**
* @brief Read value of RTC counter, converting it to microseconds