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:
parent
3b972e86ca
commit
8dc0c86457
@ -119,7 +119,9 @@ uint32_t EspClass::getFreeHeap(void)
|
|||||||
|
|
||||||
uint8_t EspClass::getChipRevision(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)
|
const char * EspClass::getSdkVersion(void)
|
||||||
|
Loading…
Reference in New Issue
Block a user