43#include "../axp1xx/AXP1xxAdc.hpp"
146 uint16_t readRegisterH8L4(uint8_t regH, uint8_t regL);
AXP202 ADC channel control and data readout (template wrapper)
static constexpr uint32_t ADC_TEMPERATURE_HW
bool setADCInputRange(uint8_t val)
Set ADC input range (REG 85H)
static constexpr uint32_t ADC_GPIO0_HW
static constexpr uint32_t ADC_VBUS_VOLTAGE_HW
bool setADCSampleRate(uint8_t rate)
Set ADC sample rate (REG 84H bits 7:6)
float getBatteryPower()
Read battery instantaneous power (REG 70H-72H, 24-bit)
float getGpio0Voltage()
Read GPIO0 ADC voltage in mV (REG 64H/65H, 12-bit H8L4)
static constexpr uint32_t ADC_TS_PIN_HW
uint8_t getADCIrqRisingThreshold()
static constexpr uint32_t ADC_BAT_VOLTAGE_HW
static constexpr uint32_t ADC_BAT_CURRENT_HW
uint8_t getADCIrqFallingThreshold()
static constexpr uint32_t ADC_ACIN_CURRENT_HW
bool setADCIrqRisingThreshold(uint8_t val)
Set ADC IRQ rising-edge threshold (REG 86H)
bool setADCIrqFallingThreshold(uint8_t val)
Set ADC IRQ falling-edge threshold (REG 87H)
static constexpr uint32_t ADC_ACIN_VOLTAGE_HW
uint16_t getADCSampleRate()
Get ADC sample rate in Hz.
uint8_t getADCInputRange()
static constexpr uint32_t ADC_GPIO1_HW
static constexpr uint32_t ADC_APS_VOLTAGE_HW
static constexpr uint32_t ADC_VBUS_CURRENT_HW
AXP202Adc(AXP202Core &core)
Construct AXP202 ADC interface.
float getTsVoltage()
Read TS pin voltage in mV (REG 62H/63H, 12-bit H8L4)
float getGpio1Voltage()
Read GPIO1 ADC voltage in mV (REG 66H/67H, 12-bit H8L4)
Generic ADC implementation for AXP1xx-based PMICs.
AXP1xxAdc(AXP202Core &core)
Construct ADC interface.