Chip revision fix (#704)

* Chip revision fix

https://www.esp32.com/viewtopic.php?f=2&t=1358&sid=f77cd62ec254317f3bbb30d8ab75ca2a&start=10

* using of esp_chip_info instead of register reading
This commit is contained in:
Testato 2017-10-08 13:48:50 +02:00 committed by Me No Dev
parent 3b972e86ca
commit 8dc0c86457

View File

@ -119,7 +119,9 @@ uint32_t EspClass::getFreeHeap(void)
uint8_t EspClass::getChipRevision(void)
{
return (REG_READ(EFUSE_BLK0_RDATA3_REG) >> EFUSE_RD_CHIP_VER_RESERVE_S) && EFUSE_RD_CHIP_VER_RESERVE_V;
esp_chip_info_t chip_info;
esp_chip_info(&chip_info);
return chip_info.revision;
}
const char * EspClass::getSdkVersion(void)