]> granicus.if.org Git - esp-idf/commitdiff
Merge branch 'refactor/timerg_in_test' into 'master'
authorAngus Gratton <angus@espressif.com>
Wed, 14 Aug 2019 07:32:16 +0000 (15:32 +0800)
committerAngus Gratton <angus@espressif.com>
Wed, 14 Aug 2019 07:32:16 +0000 (15:32 +0800)
timer_group: refactoring to avoid direct register access in the ISR

See merge request espressif/esp-idf!5656

1  2 
components/esp32/panic.c
components/esp32/system_api.c

index 9b569386238f42349ff85b3777c729303c708bb0,b0c6401de9bc8591ebcb804f9089e78611891cb3..294c3635d2bfd8c49bfad83af6e99a0f671d8c01
@@@ -421,15 -425,15 +425,16 @@@ static void reconfigureAllWdts(void
  */
  static inline void disableAllWdts(void)
  {
-     TIMERG0.wdt_wprotect = TIMG_WDT_WKEY_VALUE;
-     TIMERG0.wdt_config0.en = 0;
-     TIMERG0.wdt_wprotect = 0;
-     TIMERG1.wdt_wprotect = TIMG_WDT_WKEY_VALUE;
-     TIMERG1.wdt_config0.en = 0;
-     TIMERG1.wdt_wprotect = 0;
+     timer_ll_wdt_set_protect(&TIMERG0, false);
+     timer_ll_wdt_set_enable(&TIMERG0, false);
+     timer_ll_wdt_set_protect(&TIMERG0, true);
+     timer_ll_wdt_set_protect(&TIMERG1, false);
+     timer_ll_wdt_set_enable(&TIMERG1, false);
+     timer_ll_wdt_set_protect(&TIMERG1, true);
  }
  
 +#if CONFIG_ESP32_PANIC_PRINT_REBOOT || CONFIG_ESP32_PANIC_SILENT_REBOOT
  static void esp_panic_dig_reset(void) __attribute__((noreturn));
  
  static void esp_panic_dig_reset(void)
Simple merge