wdt: refactor wdt codes to use unified type

This commit is contained in:
jingli
2023-02-15 11:54:00 +08:00
parent 01734d15c8
commit 9c37441b17
19 changed files with 50 additions and 53 deletions

View File

@@ -114,11 +114,7 @@ static uint32_t gdbstub_hton(uint32_t i)
return __builtin_bswap32(i);
}
#if !CONFIG_IDF_TARGET_ESP32C6 && !CONFIG_IDF_TARGET_ESP32H2 // TODO: IDF-5653
static wdt_hal_context_t rtc_wdt_ctx = {.inst = WDT_RWDT, .rwdt_dev = &RTCCNTL};
#else
static wdt_hal_context_t rtc_wdt_ctx = {.inst = WDT_RWDT, .rwdt_dev = &LP_WDT};
#endif
static wdt_hal_context_t rtc_wdt_ctx = RWDT_HAL_CONTEXT_DEFAULT();
static bool rtc_wdt_ctx_enabled = false;
static wdt_hal_context_t wdt0_context = {.inst = WDT_MWDT0, .mwdt_dev = &TIMERG0};
static bool wdt0_context_enabled = false;