Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ESP.getChipModel() and ESP.getChipCores() #3847

Merged
merged 6 commits into from
Sep 30, 2020
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
ESP.getChipCores() returns the core count.
Martijn Scheepers authored and Martijn Scheepers committed Mar 24, 2020
commit 13dd87377268fff1fa1d50e1a62adfdb32fb8475
7 changes: 7 additions & 0 deletions cores/esp32/Esp.cpp
Original file line number Diff line number Diff line change
@@ -238,6 +238,13 @@ const char * EspClass::getChipModel(void)
}
}

uint8_t EspClass::getChipCores(void)
{
esp_chip_info_t chip_info;
esp_chip_info(&chip_info);
return chip_info.cores;
}

const char * EspClass::getSdkVersion(void)
{
return esp_get_idf_version();
1 change: 1 addition & 0 deletions cores/esp32/Esp.h
Original file line number Diff line number Diff line change
@@ -76,6 +76,7 @@ class EspClass

uint8_t getChipRevision();
const char * getChipModel();
uint8_t getChipCores();
uint32_t getCpuFreqMHz(){ return getCpuFrequencyMhz(); }
inline uint32_t getCycleCount() __attribute__((always_inline));
const char * getSdkVersion();