Detect under-voltage on GPIO1/11, persist UV state in NVS, enter a minimal power mode without ESP-NOW, and recover after charge; expose LED mode 6 battery-low for host testing via goTool. Co-authored-by: Cursor <cursoragent@cursor.com>
24 lines
633 B
C
24 lines
633 B
C
#ifndef POWERPOD_H
|
|
#define POWERPOD_H
|
|
|
|
/** 1 = software LiPo UV latch + energy-save mode; 0 = disabled (LED mode 6 still works). */
|
|
#ifndef POWERPOD_BATTERY_UV_ENABLE
|
|
#define POWERPOD_BATTERY_UV_ENABLE 0
|
|
#endif
|
|
|
|
#define DIP_MASTER 4
|
|
#define I2C_SCL 5
|
|
#define I2C_SDA 6
|
|
#define I2C_PORT 0
|
|
#define IO_EXPANDER_ADDRESS 0x20
|
|
|
|
/* TODO: Hardware pinning not finalized — verify against schematic before production. */
|
|
/** Front-panel button (active low, internal pull-up). */
|
|
#define TASTER_GPIO 12
|
|
|
|
/** LiPo voltage sense inputs (ADC-capable GPIOs; GPIO11 = ADC2 on ESP32-S3). */
|
|
#define V_LIPO_1_GPIO 1
|
|
#define V_LIPO_2_GPIO 11
|
|
|
|
#endif
|