Skip to content

Commit

Permalink
Add command to reset device via management app.
Browse files Browse the repository at this point in the history
Signed-off-by: Pol Henarejos <[email protected]>
  • Loading branch information
polhenarejos committed Nov 8, 2024
1 parent 244c18f commit 3b43c51
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions src/fido/management.c
Original file line number Diff line number Diff line change
Expand Up @@ -135,12 +135,20 @@ int cmd_write_config() {
return SW_OK();
}

extern int cbor_reset();
int cmd_factory_reset() {
cbor_reset();
return SW_OK();
}

#define INS_READ_CONFIG 0x1D
#define INS_WRITE_CONFIG 0x1C
#define INS_RESET 0x1E // Reset device

static const cmd_t cmds[] = {
{ INS_READ_CONFIG, cmd_read_config },
{ INS_WRITE_CONFIG, cmd_write_config },
{ INS_RESET, cmd_factory_reset },
{ 0x00, 0x0 }
};

Expand Down

0 comments on commit 3b43c51

Please sign in to comment.