soc: upgrade version printing to vX.Y

This commit is contained in:
Michael (XIAO Xufeng)
2022-11-09 17:19:35 +08:00
parent 3f2f35bd5e
commit f8d4bc8911
7 changed files with 22 additions and 7 deletions

View File

@@ -99,7 +99,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.revision / 100;
unsigned minor_rev = chip_info.revision % 100;
printf("silicon revision v%d.%d, ", major_rev, minor_rev);
if(esp_flash_get_size(NULL, &flash_size) != ESP_OK) {
printf("Get flash size failed");
return;