xtensa/esp32: Fix the type of enum passed between functions in esp32_rtc_clk
This commit is contained in:
parent
67d29e7537
commit
61ab4f9f14
|
@ -519,6 +519,17 @@ static uint16_t esp32_rtc_clk(FAR struct esp32_wdt_dev_s *dev)
|
||||||
float cycles_ms;
|
float cycles_ms;
|
||||||
uint16_t cycles_ms_int;
|
uint16_t cycles_ms_int;
|
||||||
|
|
||||||
|
/* Calibration map: Maps each RTC SLOW_CLK source to the number
|
||||||
|
* used to calibrate this source.
|
||||||
|
*/
|
||||||
|
|
||||||
|
static const enum esp32_rtc_cal_sel_e cal_map[] =
|
||||||
|
{
|
||||||
|
RTC_CAL_RTC_MUX,
|
||||||
|
RTC_CAL_32K_XTAL,
|
||||||
|
RTC_CAL_8MD256
|
||||||
|
};
|
||||||
|
|
||||||
DEBUGASSERT(dev);
|
DEBUGASSERT(dev);
|
||||||
|
|
||||||
/* Check which clock is sourcing the slow_clk_rtc */
|
/* Check which clock is sourcing the slow_clk_rtc */
|
||||||
|
@ -527,7 +538,8 @@ static uint16_t esp32_rtc_clk(FAR struct esp32_wdt_dev_s *dev)
|
||||||
|
|
||||||
/* Get the slow_clk_rtc period in us in Q13.19 fixed point format */
|
/* Get the slow_clk_rtc period in us in Q13.19 fixed point format */
|
||||||
|
|
||||||
period_13q19 = esp32_rtc_clk_cal(slow_clk_rtc, SLOW_CLK_CAL_CYCLES);
|
period_13q19 = esp32_rtc_clk_cal(cal_map[slow_clk_rtc],
|
||||||
|
SLOW_CLK_CAL_CYCLES);
|
||||||
|
|
||||||
/* Assert no error happened during the calibration */
|
/* Assert no error happened during the calibration */
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue