|
SensorLib 0.5.0
Multi-platform sensor driver library for Arduino, PlatformIO, and ESP-IDF
|
AXP192 ADC Interface (template wrapper) More...
#include <AXP192Adc.hpp>
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. | |
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.
Definition at line 56 of file AXP192Adc.hpp.
|
inlineexplicit |
Construct ADC interface.
| core | Reference to AXP192 core communication object |
Definition at line 74 of file AXP192Adc.hpp.
|
default |
|
staticconstexpr |
Definition at line 63 of file AXP192Adc.hpp.
|
staticconstexpr |
Definition at line 62 of file AXP192Adc.hpp.
|
staticconstexpr |
Definition at line 66 of file AXP192Adc.hpp.
|
staticconstexpr |
Definition at line 65 of file AXP192Adc.hpp.
|
staticconstexpr |
Definition at line 64 of file AXP192Adc.hpp.
|
staticconstexpr |
Definition at line 68 of file AXP192Adc.hpp.
|
staticconstexpr |
Definition at line 67 of file AXP192Adc.hpp.
|
staticconstexpr |
Definition at line 61 of file AXP192Adc.hpp.
|
staticconstexpr |
Definition at line 60 of file AXP192Adc.hpp.