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:
Pol Henarejos 2025-01-29 17:09:29 +01:00
parent 8eb4669c0f
commit 747e5fbe86
No known key found for this signature in database
GPG key ID: C0095B7870A4CCD3
2 changed files with 2 additions and 7 deletions

@ -1 +1 @@
Subproject commit a081a2bde641cc93c5c86cf59df548d498f67df8
Subproject commit 44ca760e1c402dfa1b7eb2258e11c3e1e688f4b0

View file

@ -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