1
0
mirror of https://github.com/esp8266/Arduino.git synced 2025-07-23 08:45:22 +03:00

Store git version of the core in the compiled binary (#2099)

* Store git version of the core in the compiled binary

* Don't update version number when using boards manager package
This commit is contained in:
Ivan Grokhotkov
2016-06-06 14:37:39 +08:00
parent dbef28d394
commit 32bd42b028
9 changed files with 69 additions and 4 deletions

View File

@ -158,6 +158,19 @@ uint32_t EspClass::getChipId(void)
return system_get_chip_id();
}
extern "C" uint32_t core_version;
extern "C" const char* core_release;
String EspClass::getCoreVersion()
{
if (core_release != NULL) {
return String(core_release);
}
char buf[12];
snprintf(buf, sizeof(buf), "%08x", core_version);
return String(buf);
}
const char * EspClass::getSdkVersion(void)
{
return system_get_sdk_version();