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

This commit is contained in:
KonstantinKondrashov 2023-01-06 01:28:14 +08:00
parent 63a755e8b2
commit 8095ee4dd2
7 changed files with 21 additions and 7 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

@ -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");