Last active
March 30, 2018 23:36
-
-
Save kuc-arc-f/de0e9fb7bb8dfd45aec5f8de71db1da3 to your computer and use it in GitHub Desktop.
esp32 ,chip Revision check
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
esp32 ,chip Revision check | |
thanks: | |
https://www.esp32.com/viewtopic.php?t=1358 | |
*/ | |
#include "soc/efuse_reg.h" | |
// | |
uint8_t getChipRevision(){ | |
return (REG_READ(EFUSE_BLK0_RDATA3_REG) >> EFUSE_RD_CHIP_VER_RESERVE_S ) && EFUSE_RD_CHIP_VER_RESERVE_V; | |
} | |
// | |
void setup() { | |
Serial.begin(115200); | |
Serial.println("#Start-Setup"); | |
Serial.printf("Chip rev=%d\n" ,getChipRevision() ); | |
} | |
void loop() { | |
// put your main code here, to run repeatedly: | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment