Add generic function to detzermine reset cuase to rcc manager

This commit is contained in:
2020-12-01 21:24:59 +01:00
parent b1271cee43
commit 8a8004e187
5 changed files with 51 additions and 20 deletions

View File

@@ -105,16 +105,4 @@ int watchdog_ack(uint32_t magic)
return ret;
}
bool watchdog_check_reset_source(void)
{
bool ret;
ret = !!(RCC->CSR & RCC_CSR_WDGRSTF);
if (ret)
RCC->CSR |= RCC_CSR_RMVF;
return ret;
}
/** @} */