Overview Proven

HAL TypePower
ChipTP4065B
InterfaceADC
DescriptionReads raw ADC voltage and maps it to a percentage using a 7-point piecewise linear LiPo discharge curve.

Implementation

Sourcecomponents/kernel_rs/src/drv_power_tp4065b.rs (967 lines)
WrapsESP-IDF adc_oneshot_read(), adc_cali_raw_to_voltage()
Tests27 unit tests

Devices

Boards that use this driver:

DeviceStatus
T-Deck ProProven
T-Deck PlusProven
Heltec V3Proven

Configuration

Configured via board.json: ADC channel, attenuation, voltage divider ratio.

Known Issues

No known issues.