SensorLib 0.5.0
Multi-platform sensor driver library for Arduino, PlatformIO, and ESP-IDF
Loading...
Searching...
No Matches
AXP192Adc Class Reference

AXP192 ADC Interface (template wrapper) More...

#include <AXP192Adc.hpp>

Inheritance diagram for AXP192Adc:
[legend]

Public Member Functions

 AXP192Adc (AXP192Core &core)
 Construct ADC interface.
 
 ~AXP192Adc ()=default
 
- Public Member Functions inherited from axp1xx::AXP1xxAdc< AXP192Core, axp1xx::AdcTraitsBase< AXP192Core > >
 AXP1xxAdc (AXP192Core &core)
 Construct ADC interface.
 
 ~AXP1xxAdc ()=default
 
bool enableChannels (uint32_t mask) override
 Enable one or more ADC channels.
 
bool enableChannels (Channel mask)
 Enable one or more ADC channels by Channel enum.
 
virtual bool enableChannels (uint32_t mask)=0
 Enable one or more ADC channels.
 
bool disableChannels (uint32_t mask) override
 Disable one or more ADC channels.
 
bool disableChannels (Channel mask)
 Disable one or more ADC channels by Channel enum.
 
virtual bool disableChannels (uint32_t mask)=0
 Disable one or more ADC channels.
 
bool read (Channel ch, float &out) override
 Read a single ADC channel value.
 
- Public Member Functions inherited from PmicAdcBase
virtual ~PmicAdcBase ()=default
 
bool enableChannels (Channel mask)
 Enable one or more ADC channels by Channel enum.
 
bool disableChannels (Channel mask)
 Disable one or more ADC channels by Channel enum.
 

Static Public Attributes

static constexpr uint32_t ADC_VBUS_VOLTAGE_HW = 0x08
 
static constexpr uint32_t ADC_VBUS_CURRENT_HW = 0x04
 
static constexpr uint32_t ADC_ACIN_VOLTAGE_HW = 0x20
 
static constexpr uint32_t ADC_ACIN_CURRENT_HW = 0x10
 
static constexpr uint32_t ADC_BAT_VOLTAGE_HW = 0x80
 
static constexpr uint32_t ADC_BAT_CURRENT_HW = 0x40
 
static constexpr uint32_t ADC_APS_VOLTAGE_HW = 0x02
 
static constexpr uint32_t ADC_TS_PIN_HW = 0x01
 
static constexpr uint32_t ADC_TEMPERATURE_HW = 0x8000
 

Additional Inherited Members

- Public Types inherited from PmicAdcBase
enum class  Channel : uint16_t {
  VBUS_VOLTAGE = (1 << 0) , VBUS_CURRENT = (1 << 1) , BAT_VOLTAGE = (1 << 2) , BAT_CURRENT = (1 << 3) ,
  VSYS_VOLTAGE = (1 << 4) , DIE_TEMPERATURE = (1 << 5) , BAT_TEMPERATURE = (1 << 6) , BAT_PERCENTAGE = (1 << 7) ,
  ACIN_VOLTAGE = (1 << 8) , ACIN_CURRENT = (1 << 9)
}
 ADC channel bitmask. More...
 
- Static Protected Member Functions inherited from PmicAdcBase
template<typename Func >
static void forEachChannel (uint32_t mask, Func fn)
 Helper to iterate over set bits in a bitmask.
 
- Protected Attributes inherited from axp1xx::AXP1xxAdc< AXP192Core, axp1xx::AdcTraitsBase< AXP192Core > >
AXP192Core_core
 Reference to I2C communication core.
 

Detailed Description

AXP192 ADC Interface (template wrapper)

Instantiates the generic AXP1xxAdc template with AXP192Core and AXP192 traits. Provides the same interface as before while benefiting from reduced code duplication.

Deprecated:
This class is now a template wrapper. Use AXP1xxAdc<AXP192Core, AdcTraitsBase<AXP192Core>> directly if more flexibility is needed.

Definition at line 56 of file AXP192Adc.hpp.

Constructor & Destructor Documentation

◆ AXP192Adc()

AXP192Adc::AXP192Adc ( AXP192Core core)
inlineexplicit

Construct ADC interface.

Parameters
coreReference to AXP192 core communication object

Definition at line 74 of file AXP192Adc.hpp.

◆ ~AXP192Adc()

AXP192Adc::~AXP192Adc ( )
default

Member Data Documentation

◆ ADC_ACIN_CURRENT_HW

constexpr uint32_t AXP192Adc::ADC_ACIN_CURRENT_HW = 0x10
staticconstexpr

Definition at line 63 of file AXP192Adc.hpp.

◆ ADC_ACIN_VOLTAGE_HW

constexpr uint32_t AXP192Adc::ADC_ACIN_VOLTAGE_HW = 0x20
staticconstexpr

Definition at line 62 of file AXP192Adc.hpp.

◆ ADC_APS_VOLTAGE_HW

constexpr uint32_t AXP192Adc::ADC_APS_VOLTAGE_HW = 0x02
staticconstexpr

Definition at line 66 of file AXP192Adc.hpp.

◆ ADC_BAT_CURRENT_HW

constexpr uint32_t AXP192Adc::ADC_BAT_CURRENT_HW = 0x40
staticconstexpr

Definition at line 65 of file AXP192Adc.hpp.

◆ ADC_BAT_VOLTAGE_HW

constexpr uint32_t AXP192Adc::ADC_BAT_VOLTAGE_HW = 0x80
staticconstexpr

Definition at line 64 of file AXP192Adc.hpp.

◆ ADC_TEMPERATURE_HW

constexpr uint32_t AXP192Adc::ADC_TEMPERATURE_HW = 0x8000
staticconstexpr

Definition at line 68 of file AXP192Adc.hpp.

◆ ADC_TS_PIN_HW

constexpr uint32_t AXP192Adc::ADC_TS_PIN_HW = 0x01
staticconstexpr

Definition at line 67 of file AXP192Adc.hpp.

◆ ADC_VBUS_CURRENT_HW

constexpr uint32_t AXP192Adc::ADC_VBUS_CURRENT_HW = 0x04
staticconstexpr

Definition at line 61 of file AXP192Adc.hpp.

◆ ADC_VBUS_VOLTAGE_HW

constexpr uint32_t AXP192Adc::ADC_VBUS_VOLTAGE_HW = 0x08
staticconstexpr

Definition at line 60 of file AXP192Adc.hpp.


The documentation for this class was generated from the following file: