Removed useless "powerupReason"

This commit is contained in:
Raphael Coeffic
2021-07-27 08:09:04 +02:00
parent 15e19a52c4
commit 7700df705c
2 changed files with 40 additions and 27 deletions
-5
View File
@@ -21,7 +21,6 @@
#include "pwr.h"
#include "board.h"
uint32_t powerupReason __NOINIT; // Stores power up reason beyond initialization for emergency mode activation
uint32_t boardState __NOINIT;
void pwrInit()
@@ -89,10 +88,6 @@ bool pwrPressed()
void pwrResetHandler()
{
if (boardState != BOARD_POWER_OFF) {
powerupReason = boardState != BOARD_REBOOT && WAS_RESET_BY_WATCHDOG_OR_SOFTWARE() ? DIRTY_SHUTDOWN : ~DIRTY_SHUTDOWN;
RCC->CSR |= RCC_CSR_RMVF; //clear all flags
}
else {
powerupReason = ~DIRTY_SHUTDOWN;
}
}