app: Updates the chip version format (vX.Y)

This commit is contained in:
KonstantinKondrashov 2023-01-06 01:28:14 +08:00 committed by Sergei Silnov
parent 1027c02aa1
commit 8ca1779931
8 changed files with 24 additions and 8 deletions

View File

@ -64,7 +64,9 @@ static int get_version(int argc, char **argv)
info.features & CHIP_FEATURE_BT ? "/BT" : "",
info.features & CHIP_FEATURE_EMB_FLASH ? "/Embedded-Flash:" : "/External-Flash:",
spi_flash_get_chip_size() / (1024 * 1024), " MB");
printf("\trevision number:%d\r\n", info.revision);
unsigned major_rev = info.full_revision / 100;
unsigned minor_rev = info.full_revision % 100;
printf("\trevision number:v%d.%d\r\n", major_rev, minor_rev);
return 0;
}

View File

@ -24,7 +24,9 @@ void app_main(void)
(chip_info.features & CHIP_FEATURE_BT) ? "/BT" : "",
(chip_info.features & CHIP_FEATURE_BLE) ? "/BLE" : "");
printf("silicon revision %d, ", chip_info.revision);
unsigned major_rev = chip_info.full_revision / 100;
unsigned minor_rev = chip_info.full_revision % 100;
printf("silicon revision v%d.%d, ", major_rev, minor_rev);
printf("%dMB %s flash\n", spi_flash_get_chip_size() / (1024 * 1024),
(chip_info.features & CHIP_FEATURE_EMB_FLASH) ? "embedded" : "external");

View File

@ -26,7 +26,9 @@ void app_main(void)
(chip_info.features & CHIP_FEATURE_BT) ? "/BT" : "",
(chip_info.features & CHIP_FEATURE_BLE) ? "/BLE" : "");
printf("silicon revision %d, ", chip_info.revision);
unsigned major_rev = chip_info.full_revision / 100;
unsigned minor_rev = chip_info.full_revision % 100;
printf("silicon revision v%d.%d, ", major_rev, minor_rev);
printf("%dMB %s flash\n", spi_flash_get_chip_size() / (1024 * 1024),
(chip_info.features & CHIP_FEATURE_EMB_FLASH) ? "embedded" : "external");

View File

@ -60,7 +60,9 @@ static void example_print_chip_info(void)
(chip_info.features & CHIP_FEATURE_BT) ? "/BT" : "",
(chip_info.features & CHIP_FEATURE_BLE) ? "/BLE" : "");
printf("silicon revision %d, ", chip_info.revision);
unsigned major_rev = chip_info.full_revision / 100;
unsigned minor_rev = chip_info.full_revision % 100;
printf("silicon revision v%d.%d, ", major_rev, minor_rev);
printf("%dMB %s flash\n", spi_flash_get_chip_size() / (1024 * 1024),
(chip_info.features & CHIP_FEATURE_EMB_FLASH) ? "embedded" : "external");

View File

@ -78,7 +78,9 @@ static int get_version(int argc, char **argv)
info.features & CHIP_FEATURE_BT ? "/BT" : "",
info.features & CHIP_FEATURE_EMB_FLASH ? "/Embedded-Flash:" : "/External-Flash:",
spi_flash_get_chip_size() / (1024 * 1024), " MB");
printf("\trevision number:%d\r\n", info.revision);
unsigned major_rev = info.full_revision / 100;
unsigned minor_rev = info.full_revision % 100;
printf("\trevision number:v%d.%d\r\n", major_rev, minor_rev);
return 0;
}

View File

@ -39,7 +39,9 @@ static void example_print_chip_info(void)
esp_chip_info(&chip_info);
printf("This is %s chip with %d CPU cores\n", CONFIG_IDF_TARGET, chip_info.cores);
printf("silicon revision %d, ", chip_info.revision);
unsigned major_rev = chip_info.full_revision / 100;
unsigned minor_rev = chip_info.full_revision % 100;
printf("silicon revision v%d.%d, ", major_rev, minor_rev);
printf("%dMB %s flash\n", spi_flash_get_chip_size() / (1024 * 1024),
(chip_info.features & CHIP_FEATURE_EMB_FLASH) ? "embedded" : "external");

View File

@ -41,7 +41,9 @@ static void example_print_chip_info(void)
(chip_info.features & CHIP_FEATURE_BT) ? "/BT" : "",
(chip_info.features & CHIP_FEATURE_BLE) ? "/BLE" : "");
printf("silicon revision %d, ", chip_info.revision);
unsigned major_rev = chip_info.full_revision / 100;
unsigned minor_rev = chip_info.full_revision % 100;
printf("silicon revision v%d.%d, ", major_rev, minor_rev);
printf("%dMB %s flash\n", spi_flash_get_chip_size() / (1024 * 1024),
(chip_info.features & CHIP_FEATURE_EMB_FLASH) ? "embedded" : "external");

View File

@ -26,7 +26,9 @@ void app_main(void)
(chip_info.features & CHIP_FEATURE_BT) ? "/BT" : "",
(chip_info.features & CHIP_FEATURE_BLE) ? "/BLE" : "");
printf("silicon revision %d, ", chip_info.revision);
unsigned major_rev = chip_info.full_revision / 100;
unsigned minor_rev = chip_info.full_revision % 100;
printf("silicon revision v%d.%d, ", major_rev, minor_rev);
printf("%dMB %s flash\n", spi_flash_get_chip_size() / (1024 * 1024),
(chip_info.features & CHIP_FEATURE_EMB_FLASH) ? "embedded" : "external");