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:20 +01:00
parent 4992d8e273
commit 44ca760e1c
No known key found for this signature in database
GPG key ID: C0095B7870A4CCD3

View file

@ -70,11 +70,12 @@ int cmd_write() {
#ifndef ENABLE_EMULATION
int ret = phy_unserialize_data(apdu.data, apdu.nc, &phy_data);
if (ret == PICOKEY_OK) {
file_put_data(ef_phy, apdu.data, apdu.nc);
if (phy_save() != PICOKEY_OK) {
return SW_EXEC_ERROR();
}
}
#endif
}
low_flash_available();
return SW_OK();
}