mirror of
https://github.com/espressif/esp-idf
synced 2025-03-10 01:29:21 -04:00
esp32s2: Fix embedded flash feature flag for ESP32-S2FH16, ESP32-S2FH32
Corrects the output printed by the hello_world example. Closes https://github.com/espressif/esp-idf/issues/5774
This commit is contained in:
parent
935e4b4d62
commit
19bf4aea74
@ -17,6 +17,7 @@
|
||||
#include "esp_system.h"
|
||||
#include "esp_private/system_internal.h"
|
||||
#include "esp_attr.h"
|
||||
#include "esp_efuse.h"
|
||||
#include "esp_log.h"
|
||||
#include "esp32s2/rom/cache.h"
|
||||
#include "esp_rom_uart.h"
|
||||
@ -112,9 +113,23 @@ void IRAM_ATTR esp_restart_noos(void)
|
||||
|
||||
void esp_chip_info(esp_chip_info_t *out_info)
|
||||
{
|
||||
uint32_t pkg_ver = esp_efuse_get_pkg_ver();
|
||||
|
||||
memset(out_info, 0, sizeof(*out_info));
|
||||
|
||||
out_info->model = CHIP_ESP32S2;
|
||||
out_info->cores = 1;
|
||||
out_info->features = CHIP_FEATURE_WIFI_BGN;
|
||||
|
||||
switch (pkg_ver) {
|
||||
case 0: // ESP32-S2
|
||||
break;
|
||||
case 1: // ESP32-S2FH16
|
||||
// fallthrough
|
||||
case 2: // ESP32-S2FH32
|
||||
out_info->features |= CHIP_FEATURE_EMB_FLASH;
|
||||
break;
|
||||
default: // New package, features unknown
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user