Update processor

This commit is contained in:
fvanroie 2020-05-22 20:29:32 +02:00
parent f565ebab28
commit 3593b2c6da
2 changed files with 10 additions and 6 deletions

View File

@ -126,13 +126,14 @@ String halGetChipModel()
{
String model((char *)0);
model.reserve(128);
model = F("STM32");
#if ESP8266
#if defined(STM32F4xx)
model = F("STM32F4xx");
#elif defined(ARDUINO_ARCH_ESP8266)
model = F("ESP8266");
#endif
#if ESP32
#elif defined(ARDUINO_ARCH_ESP32)
esp_chip_info_t chip_info;
esp_chip_info(&chip_info);
@ -152,7 +153,10 @@ String halGetChipModel()
}
model += F(" rev");
model += chip_info.revision;
#endif // ESP32
#else
model = F("Unknown");
#endif
return model;
}

View File

@ -57,7 +57,7 @@ void tftShowConfig(TFT_eSPI & tft)
// #else
// Log.verbose(F("TFT: Processor : STM%x"), tftSetup.esp);
// #endif
Log.verbose(F("TFT: Processor : %s"), halGetChipModel());
Log.verbose(F("TFT: Processor : %s"), halGetChipModel().c_str());
Log.verbose(F("TFT: CPU freq. : %i MHz"), halGetCpuFreqMHz());
#if defined(ARDUINO_ARCH_ESP8266)