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
#include <nvs.h> | |
#include <nvs_flash.h> | |
/** | |
* Testing dedicated NVS partition access | |
* | |
* Used partition table | |
* # Name, Type, SubType, Offset, Size, Flags | |
* nvs, data, nvs, 0x9000, 0x3000 | |
* void, data, nvs, 0xC000, 0x2000 | |
* nvs_key, data, nvs_keys, 0xE000, 0x1000 |
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
//print uint64_t 4 bits at a time, single HEX digit | |
uint64_t chipid = ESP.getEfuseMac(); | |
for (size_t i = 0; i < 16; i++) | |
{ | |
byte byte1 = chipid >> 4*i & 0x0000000F; | |
Serial.printf("%X ", byte1); | |
} | |
// 0 3 E A 4 A 0 4 A E 0 E 0 0 0 0 | |
//print uint64_t 4 bits at a time, in pairs of 8 bits, single HEX digit |