Michael Cardell Widerkrantz a3bdc73efa
fw: Simplify starting management app
- In state INITIAL: Register allowed app digest early for the default
  case where we start from flash slot 0. Transition to LOAD_FLASH_MGMT.

- Introduce new state FW_STATE_LOAD_FLASH_MGMT which loads an app from
  flash slot 0 and registers app as a prospective management app.

- Rely on ordinary verification in state START to actually do the
  verification of the prospective management app.
2025-04-11 09:38:04 +02:00

20 lines
299 B
C

/*
* Copyright (C) 2023 - Tillitis AB
* SPDX-License-Identifier: GPL-2.0-only
*/
#ifndef STATE_H
#define STATE_H
enum state {
FW_STATE_INITIAL,
FW_STATE_WAITCOMMAND,
FW_STATE_LOADING,
FW_STATE_LOAD_FLASH,
FW_STATE_LOAD_FLASH_MGMT,
FW_STATE_START,
FW_STATE_FAIL,
FW_STATE_MAX,
};
#endif