diff options
author | Jeff Hatch <jhatch@multitech.com> | 2022-09-26 12:27:28 -0500 |
---|---|---|
committer | Jeff Hatch <jhatch@multitech.com> | 2022-09-26 12:27:28 -0500 |
commit | 2915166559ea8ac70b515414ac0b2a86438b22f9 (patch) | |
tree | 2fc36a7650b73561db795870774095329f05a707 | |
parent | f32c2681ee4d1f8d07af881a3e68366e5fe646db (diff) | |
parent | 077a8cbfc0f42e669178f6311c4a68f5aeb61f19 (diff) | |
download | mts-id-eeprom-2915166559ea8ac70b515414ac0b2a86438b22f9.tar.gz mts-id-eeprom-2915166559ea8ac70b515414ac0b2a86438b22f9.tar.bz2 mts-id-eeprom-2915166559ea8ac70b515414ac0b2a86438b22f9.zip |
Merge branch 'vv/MTX-4639/MTCDT3_EEPROM_review' into 'master'
Vv/mtx 4639/mtcdt3 eeprom review
See merge request !6
-rw-r--r-- | src/eeprom_main.c | 30 |
1 files changed, 5 insertions, 25 deletions
diff --git a/src/eeprom_main.c b/src/eeprom_main.c index 7b1c78c..d2199a0 100644 --- a/src/eeprom_main.c +++ b/src/eeprom_main.c @@ -308,9 +308,6 @@ static int mtcdt3b_yaml_out(const char *name, struct mtcdt3b_eeprom_layout *mtcd mtcdt3b_eeprom->mac_addr[3], mtcdt3b_eeprom->mac_addr[4], mtcdt3b_eeprom->mac_addr[5]); - fprintf(file, "capa-lora: %s\n", DEVICE_CAPA(mtcdt3b_eeprom->capa, MTCDT3B_CAPA_LORA) ? "true" : "false"); - fprintf(file, "lora-product-id: \"%.32s\"\n", mtcdt3b_eeprom->lora_product_id); - fprintf(file, "lora-hw-version: \"%.32s\"\n", mtcdt3b_eeprom->lora_hw_version); for(i=0;i<2;i++) { fprintf(file,"slot %d:\n",i); fprintf(file, " lora-device-id: \"%.32s\"\n", mtcdt3b_eeprom->slot[i].device_id); @@ -325,8 +322,8 @@ static int mtcdt3b_yaml_out(const char *name, struct mtcdt3b_eeprom_layout *mtcd mtcdt3b_eeprom->slot[i].lora_eui[7]); } fprintf(file, "capa-eth-switch: %s\n", DEVICE_CAPA(mtcdt3b_eeprom->capa, MTCDT3B_CAPA_ETH_SWITCH) ? "true" : "false"); - fprintf(file, "hw-version-eth-switch: %hu\n", mtcdt3b_eeprom->hw_version_eth_switch); - fprintf(file, "mac-eth-switch: \"%02X:%02X:%02X:%02X:%02X:%02X\"\n", + fprintf(file, "eth-switch-version: %hu\n", mtcdt3b_eeprom->hw_version_eth_switch); + fprintf(file, "eth-switch-mac-addr: \"%02X:%02X:%02X:%02X:%02X:%02X\"\n", mtcdt3b_eeprom->mac_eth_switch[0], mtcdt3b_eeprom->mac_eth_switch[1], mtcdt3b_eeprom->mac_eth_switch[2], @@ -525,9 +522,6 @@ static void mtcdt3b_eeprom_inspect(struct mtcdt3b_eeprom_layout *mtcdt3b_eeprom) mtcdt3b_eeprom->mac_addr[3], mtcdt3b_eeprom->mac_addr[4], mtcdt3b_eeprom->mac_addr[5]); - log_info("mtcdt3b-capa-lora: %s", DEVICE_CAPA(mtcdt3b_eeprom->capa, MTCDT3B_CAPA_LORA) ? "yes" : "no"); - log_info("lora-product-id: %.32s", mtcdt3b_eeprom->lora_product_id); - log_info("lora-hw-version: %.32s", mtcdt3b_eeprom->lora_hw_version); for(i=0;i<2;i++) { log_info("slot %d:",i); log_info(" lora-device-id: \"%.32s\"", mtcdt3b_eeprom->slot[i].device_id); @@ -542,8 +536,8 @@ static void mtcdt3b_eeprom_inspect(struct mtcdt3b_eeprom_layout *mtcdt3b_eeprom) mtcdt3b_eeprom->slot[i].lora_eui[7]); } log_info("capa-eth-switch: %s", DEVICE_CAPA(mtcdt3b_eeprom->capa, MTCDT3B_CAPA_ETH_SWITCH) ? "yes" : "no"); - log_info("hw-version-eth-switch: %hu", mtcdt3b_eeprom->hw_version_eth_switch); - log_info("mac-eth-switch: \"%02X:%02X:%02X:%02X:%02X:%02X\"", + log_info("eth-switch-version: %hu", mtcdt3b_eeprom->hw_version_eth_switch); + log_info("eth-switch-mac-addr: \"%02X:%02X:%02X:%02X:%02X:%02X\"", mtcdt3b_eeprom->mac_eth_switch[0], mtcdt3b_eeprom->mac_eth_switch[1], mtcdt3b_eeprom->mac_eth_switch[2], @@ -1054,12 +1048,6 @@ int main(int argc, char *argv[]) { break; case CMD_OPT_CAPA_LORA: -#ifdef MTCDT3B - if (base_board) { - DEVICE_CAPA_SET(mtcdt3b_eeprom.capa, MTCDT3B_CAPA_LORA); - break; - } -#endif DEVICE_CAPA_SET(id_eeprom.capa, CAPA_LORA); break; #ifdef MTCDT3B @@ -1068,7 +1056,7 @@ int main(int argc, char *argv[]) { DEVICE_CAPA_SET(mtcdt3dc_eeprom.capa, MTCDT3DC_CAPA_MTAC); } break; - + case CMD_OPT_CAPA_SERIAL: if (daughter_board) { DEVICE_CAPA_SET(mtcdt3dc_eeprom.capa, MTCDT3DC_CAPA_SERIAL); @@ -1294,10 +1282,6 @@ int main(int argc, char *argv[]) { usage(stderr); exit(1); } -#ifdef MTCDT3B - else if (base_board) - EEPROM_SET(mtcdt3b_eeprom,lora_product_id) -#endif else EEPROM_SET(id_eeprom,lora_product_id) } @@ -1309,10 +1293,6 @@ int main(int argc, char *argv[]) { usage(stderr); exit(1); } -#ifdef MTCDT3B - else if (base_board) - EEPROM_SET(mtcdt3b_eeprom,lora_hw_version) -#endif else EEPROM_SET(id_eeprom,lora_hw_version) } |