feat: config module — NVS read/write via Preferences

Add config.h/config.cpp for DeviceConfig NVS persistence using Arduino
Preferences library. Add minimal main.cpp stub. Fix partition table
overlap (nvs 0x6000→0x5000, otadata 0xf000→0xe000) so firmware builds.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-04-13 14:02:28 -07:00
parent f4d9e1b2a5
commit d5afd0bd87
4 changed files with 77 additions and 2 deletions

View File

@@ -1,6 +1,6 @@
# Name, Type, SubType, Offset, Size
nvs, data, nvs, 0x9000, 0x6000
otadata, data, ota, 0xf000, 0x2000
nvs, data, nvs, 0x9000, 0x5000
otadata, data, ota, 0xe000, 0x2000
app0, app, ota_0, 0x10000, 0x300000
app1, app, ota_1, 0x310000, 0x300000
spiffs, data, spiffs, 0x610000, 0x1F0000
1 # Name Type SubType Offset Size
2 nvs data nvs 0x9000 0x6000 0x5000
3 otadata data ota 0xf000 0xe000 0x2000
4 app0 app ota_0 0x10000 0x300000
5 app1 app ota_1 0x310000 0x300000
6 spiffs data spiffs 0x610000 0x1F0000