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
2 changed files with 2 additions and 7 deletions

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