Add command to reset device via management app.

Signed-off-by: Pol Henarejos <pol.henarejos@cttc.es>
This commit is contained in:
Pol Henarejos
2024-11-08 19:33:40 +01:00
parent 244c18fb51
commit 3b43c5112b

View File

@@ -135,12 +135,20 @@ int cmd_write_config() {
return SW_OK(); return SW_OK();
} }
extern int cbor_reset();
int cmd_factory_reset() {
cbor_reset();
return SW_OK();
}
#define INS_READ_CONFIG 0x1D #define INS_READ_CONFIG 0x1D
#define INS_WRITE_CONFIG 0x1C #define INS_WRITE_CONFIG 0x1C
#define INS_RESET 0x1E // Reset device
static const cmd_t cmds[] = { static const cmd_t cmds[] = {
{ INS_READ_CONFIG, cmd_read_config }, { INS_READ_CONFIG, cmd_read_config },
{ INS_WRITE_CONFIG, cmd_write_config }, { INS_WRITE_CONFIG, cmd_write_config },
{ INS_RESET, cmd_factory_reset },
{ 0x00, 0x0 } { 0x00, 0x0 }
}; };