mirror of
https://github.com/polhenarejos/pico-hsm.git
synced 2026-01-17 01:18:06 +00:00
Added phy_save() and phy_load() to save and load PHY.
Signed-off-by: Pol Henarejos <pol.henarejos@cttc.es>
This commit is contained in:
parent
8eb4669c0f
commit
747e5fbe86
2 changed files with 2 additions and 7 deletions
|
|
@ -1 +1 @@
|
|||
Subproject commit a081a2bde641cc93c5c86cf59df548d498f67df8
|
||||
Subproject commit 44ca760e1c402dfa1b7eb2258e11c3e1e688f4b0
|
||||
|
|
@ -235,14 +235,9 @@ int cmd_extras() {
|
|||
else {
|
||||
return SW_INCORRECT_P1P2();
|
||||
}
|
||||
uint8_t tmp[PHY_MAX_SIZE];
|
||||
uint16_t tmp_len = 0;
|
||||
memset(tmp, 0, sizeof(tmp));
|
||||
if (phy_serialize_data(&phy_data, tmp, &tmp_len) != PICOKEY_OK) {
|
||||
if (phy_save() != PICOKEY_OK) {
|
||||
return SW_EXEC_ERROR();
|
||||
}
|
||||
file_put_data(ef_phy, tmp, tmp_len);
|
||||
low_flash_available();
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue