mirror of
https://github.com/tillitis/tillitis-key1.git
synced 2025-08-18 19:27:59 -04:00
fw: Simplify logic
Switch on state, then read commands specifically in the states that allow reading of commands, then switch on specific command.
This commit is contained in:
parent
7a97f1ee5f
commit
4e3f5469ef
4 changed files with 206 additions and 196 deletions
16
hw/application_fpga/fw/tk1/state.h
Normal file
16
hw/application_fpga/fw/tk1/state.h
Normal file
|
@ -0,0 +1,16 @@
|
|||
/*
|
||||
* 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_LOADING,
|
||||
FW_STATE_RUN,
|
||||
FW_STATE_FAIL,
|
||||
FW_STATE_MAX,
|
||||
};
|
||||
#endif
|
Loading…
Add table
Add a link
Reference in a new issue