drv_power_tp4065b
ADC-based battery monitor for LiPo cells charged by the TP4065B. Uses ESP-IDF oneshot ADC API.
Overview Proven
| HAL Type | Power |
| Chip | TP4065B |
| Interface | ADC |
| Description | Reads raw ADC voltage and maps it to a percentage using a 7-point piecewise linear LiPo discharge curve. |
Implementation
| Source | components/kernel_rs/src/drv_power_tp4065b.rs (967 lines) |
| Wraps | ESP-IDF adc_oneshot_read(), adc_cali_raw_to_voltage() |
| Tests | 27 unit tests |
Devices
Boards that use this driver:
| Device | Status |
|---|---|
| T-Deck Pro | Proven |
| T-Deck Plus | Proven |
| Heltec V3 | Proven |
Configuration
Configured via board.json: ADC channel, attenuation, voltage divider ratio.
Known Issues
No known issues.