diff options
-rw-r--r-- | src/eeprom_main.c | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/src/eeprom_main.c b/src/eeprom_main.c index 66c948b..ed7d674 100644 --- a/src/eeprom_main.c +++ b/src/eeprom_main.c @@ -173,6 +173,7 @@ static int id_yaml_out(const char *name, struct mts_id_eeprom_layout *id_eeprom) fprintf(file, "capa-battery: %s\n", DEVICE_CAPA(id_eeprom->capa, CAPA_BATTERY) ? "true" : "false"); fprintf(file, "capa-supercap: %s\n", DEVICE_CAPA(id_eeprom->capa, CAPA_SUPERCAP) ? "true" : "false"); fprintf(file, "capa-cellular: %s\n", DEVICE_CAPA(id_eeprom->capa, CAPA_CELLULAR) ? "true" : "false"); + fprintf(file, "capa-user-data-encryption: %s\n", DEVICE_CAPA(id_eeprom->capa, CAPA_USER_DATA_ENCRYPTION) ? "true" : "false"); fprintf(file, "capa: \""); for (i = 0; i < sizeof(id_eeprom->capa); i++) { @@ -397,6 +398,7 @@ static void mts_id_eeprom_inspect(struct mts_id_eeprom_layout *id_eeprom) log_info("capa-lora-lbt: %s", DEVICE_CAPA(id_eeprom->capa, CAPA_LORA_LBT) ? "yes" : "no"); log_info("capa-supercap: %s", DEVICE_CAPA(id_eeprom->capa, CAPA_SUPERCAP) ? "yes" : "no"); log_info("capa-cellular: %s", DEVICE_CAPA(id_eeprom->capa, CAPA_CELLULAR) ? "yes" : "no"); + log_info("capa-user-data-encryption: %s", DEVICE_CAPA(id_eeprom->capa, CAPA_USER_DATA_ENCRYPTION) ? "yes" : "no"); log_info("mac-bluetooth: %02X:%02X:%02X:%02X:%02X:%02X", id_eeprom->mac_bluetooth[0], @@ -558,6 +560,7 @@ static void usage(FILE *out) { fprintf(out, " --capa-battery |\n"); fprintf(out, " --capa-supercap |\n"); fprintf(out, " --capa-cellular |\n"); + fprintf(out, " --capa-user-data-encryption |\n"); fprintf(out, " --capa-clear (clears all flags) |\n"); fprintf(out, " --hex-to-bin | \n"); fprintf(out, " --out-format { bin | yaml (default) } |\n"); @@ -600,6 +603,7 @@ enum { CMD_OPT_CAPA_BATTERY, CMD_OPT_CAPA_SUPERCAP, CMD_OPT_CAPA_CELLULAR, + CMD_OPT_CAPA_USER_DATA_ENCRYPTION, CMD_OPT_CAPA_CLEAR, CMD_OPT_OUT_FORMAT, CMD_OPT_UPDATE, @@ -651,6 +655,7 @@ static struct option long_options[] = { {"capa-battery", 0, NULL, CMD_OPT_CAPA_BATTERY}, {"capa-supercap", 0, NULL, CMD_OPT_CAPA_SUPERCAP}, {"capa-cellular", 0, NULL, CMD_OPT_CAPA_CELLULAR}, + {"capa-user-data-encryption", 0, NULL, CMD_OPT_CAPA_USER_DATA_ENCRYPTION}, {"capa-clear", 0, NULL, CMD_OPT_CAPA_CLEAR}, {"hex-to-bin", 0, NULL, CMD_OPT_HEX_TO_BIN}, {"out-format", 1, NULL, CMD_OPT_OUT_FORMAT}, @@ -972,9 +977,11 @@ int main(int argc, char *argv[]) { #endif DEVICE_CAPA_SET(id_eeprom.capa, CAPA_LORA); break; + case CMD_OPT_CAPA_LORA_LBT: DEVICE_CAPA_SET(id_eeprom.capa, CAPA_LORA_LBT); break; + case CMD_OPT_CAPA_BATTERY: DEVICE_CAPA_SET(id_eeprom.capa, CAPA_BATTERY); break; @@ -987,6 +994,10 @@ int main(int argc, char *argv[]) { DEVICE_CAPA_SET(id_eeprom.capa, CAPA_CELLULAR); break; + case CMD_OPT_CAPA_USER_DATA_ENCRYPTION: + DEVICE_CAPA_SET(id_eeprom.capa, CAPA_USER_DATA_ENCRYPTION); + break; + case CMD_OPT_CAPA_CLEAR: capa_clear = 1; break; |