bugfix(timer): add a macro to control making the XTAL related functions

This commit is contained in:
chenjianqiang
2019-11-25 20:10:27 +08:00
committed by bot
parent 856d9f7d89
commit bcfe684951
6 changed files with 41 additions and 10 deletions
@@ -111,7 +111,7 @@ static void example_tg0_timer_init(int timer_idx,
config.alarm_en = TIMER_ALARM_EN;
config.intr_type = TIMER_INTR_LEVEL;
config.auto_reload = auto_reload;
#ifdef CONFIG_IDF_TARGET_ESP32S2BETA
#ifdef TIMER_GROUP_SUPPORTS_XTAL_CLOCK
config.clk_src = TIMER_SRC_CLK_APB;
#endif
timer_init(TIMER_GROUP_0, timer_idx, &config);