summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohn Klug <john.klug@multitech.com>2016-10-04 17:19:25 -0500
committerJohn Klug <john.klug@multitech.com>2016-10-04 17:19:25 -0500
commitf07e89c6d3dda5fa3969c086bc15ffcabe5a899b (patch)
tree354152d67c1cc8edc945835f55ddb8a7e8302e0b
parent55aafc2f3b7fb754080999671a1d1ee3d3f9266b (diff)
downloadmts-id-eeprom-f07e89c6d3dda5fa3969c086bc15ffcabe5a899b.tar.gz
mts-id-eeprom-f07e89c6d3dda5fa3969c086bc15ffcabe5a899b.tar.bz2
mts-id-eeprom-f07e89c6d3dda5fa3969c086bc15ffcabe5a899b.zip
Add gnss and wifi-bluetooth to the EEPROM
-rw-r--r--src/eeprom_main.c18
1 files changed, 18 insertions, 0 deletions
diff --git a/src/eeprom_main.c b/src/eeprom_main.c
index 22b2bb5..46dd624 100644
--- a/src/eeprom_main.c
+++ b/src/eeprom_main.c
@@ -160,6 +160,8 @@ static int id_yaml_out(const char *name, struct mts_id_eeprom_layout *id_eeprom)
fprintf(file, "capa-adc: %s\n", DEVICE_CAPA(id_eeprom->capa, CAPA_ADC) ? "true" : "false");
fprintf(file, "capa-wifi: %s\n", DEVICE_CAPA(id_eeprom->capa, CAPA_WIFI) ? "true" : "false");
fprintf(file, "capa-bluetooth: %s\n", DEVICE_CAPA(id_eeprom->capa, CAPA_BLUETOOTH) ? "true" : "false");
+ fprintf(file, "capa-wifi-bluetooth: %s\n", DEVICE_CAPA(id_eeprom->capa, CAPA_WIFI_BT) ? "true" : "false");
+ fprintf(file, "capa-gnss: %s\n", DEVICE_CAPA(id_eeprom->capa, CAPA_GNSS) ? "true" : "false");
fprintf(file, "capa: \"");
@@ -292,6 +294,8 @@ static void mts_id_eeprom_inspect(struct mts_id_eeprom_layout *id_eeprom)
log_info("capa-adc: %s", DEVICE_CAPA(id_eeprom->capa, CAPA_ADC) ? "yes" : "no");
log_info("capa-wifi: %s", DEVICE_CAPA(id_eeprom->capa, CAPA_WIFI) ? "yes" : "no");
log_info("capa-bluetooth: %s", DEVICE_CAPA(id_eeprom->capa, CAPA_BLUETOOTH) ? "yes" : "no");
+ log_info("capa-wifi-bluetooth: %s\n", DEVICE_CAPA(id_eeprom->capa, CAPA_WIFI_BT) ? "yes" : "no");
+ log_info("capa-gnss: %s\n", DEVICE_CAPA(id_eeprom->capa, CAPA_GNSS) ? "yes" : "no");
log_info("mac-bluetooth: %02X:%02X:%02X:%02X:%02X:%02X",
id_eeprom->mac_bluetooth[0],
@@ -370,6 +374,8 @@ static void usage(FILE *out) {
fprintf(out, " --capa-adc |\n");
fprintf(out, " --capa-wifi |\n");
fprintf(out, " --capa-bluetooth |\n");
+ fprintf(out, " --capa-wifi-bluetooth |\n");
+ fprintf(out, " --capa-gnss |\n");
fprintf(out, " --capa-clear (clears all flags) |\n");
fprintf(out, " --out-format { bin | yaml (default) } |\n");
fprintf(out, " --update |\n");
@@ -397,6 +403,8 @@ enum {
CMD_OPT_CAPA_ADC,
CMD_OPT_CAPA_WIFI,
CMD_OPT_CAPA_BLUETOOTH,
+ CMD_OPT_CAPA_WIFI_BT,
+ CMD_OPT_CAPA_GNSS,
CMD_OPT_CAPA_CLEAR,
CMD_OPT_OUT_FORMAT,
CMD_OPT_UPDATE,
@@ -425,6 +433,8 @@ static struct option long_options[] = {
{"capa-adc", 0, NULL, CMD_OPT_CAPA_ADC},
{"capa-wifi", 0, NULL, CMD_OPT_CAPA_WIFI},
{"capa-bluetooth", 0, NULL, CMD_OPT_CAPA_BLUETOOTH},
+ {"capa-wifi-bluetooth", 0, NULL, CMD_OPT_CAPA_WIFI_BT},
+ {"capa-gnss", 0, NULL, CMD_OPT_CAPA_GNSS},
{"capa-clear", 0, NULL, CMD_OPT_CAPA_CLEAR},
{"out-format", 1, NULL, CMD_OPT_OUT_FORMAT},
{"update", 0, NULL, CMD_OPT_UPDATE},
@@ -647,6 +657,14 @@ int main(int argc, char *argv[]) {
DEVICE_CAPA_SET(id_eeprom.capa, CAPA_BLUETOOTH);
break;
+ case CMD_OPT_CAPA_WIFI_BT:
+ DEVICE_CAPA_SET(id_eeprom.capa, CAPA_WIFI_BT);
+ break;
+
+ case CMD_OPT_CAPA_GNSS:
+ DEVICE_CAPA_SET(id_eeprom.capa, CAPA_GNSS);
+ break;
+
case CMD_OPT_CAPA_CLEAR:
memset(id_eeprom.capa, 0, sizeof(id_eeprom.capa));
break;