mirror of
https://github.com/espressif/esp-idf.git
synced 2024-10-05 20:47:46 -04:00
app: Updates the chip version format (vX.Y)
This commit is contained in:
parent
1027c02aa1
commit
8ca1779931
@ -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;
|
||||
}
|
||||
|
||||
|
@ -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");
|
||||
|
@ -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");
|
||||
|
@ -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");
|
||||
|
@ -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;
|
||||
}
|
||||
|
||||
|
@ -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");
|
||||
|
@ -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");
|
||||
|
@ -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");
|
||||
|
Loading…
Reference in New Issue
Block a user