supervisor: add a new WATCHDOG_RESET safe mode reason

This mode will be used if the board is reset due to the watchdog
expiring.

Signed-off-by: Sean Cross <sean@xobs.io>
This commit is contained in:
Sean Cross 2020-05-22 12:56:14 +08:00
parent 08362c9cab
commit 8c5df5f732
2 changed files with 4 additions and 0 deletions

View File

@ -160,6 +160,9 @@ void print_safe_mode_message(safe_mode_t reason) {
case MEM_MANAGE:
serial_write_compressed(translate("Invalid memory access."));
break;
case WATCHDOG_RESET:
serial_write_compressed(translate("Watchdog timer expired."));
break;
default:
serial_write_compressed(translate("Unknown reason."));
break;

View File

@ -41,6 +41,7 @@ typedef enum {
NORDIC_SOFT_DEVICE_ASSERT,
FLASH_WRITE_FAIL,
MEM_MANAGE,
WATCHDOG_RESET,
} safe_mode_t;
safe_mode_t wait_for_safe_mode_reset(void);