|
SensorLib 0.5.0
Multi-platform sensor driver library for Arduino, PlatformIO, and ESP-IDF
|
AXP202 ADC traits specialization. More...
#include <AXP202AdcTraits.hpp>
Static Public Member Functions | |
| static uint32_t | getChannelMask (PmicAdcBase::Channel ch) |
| Map PmicAdcBase::Channel to AXP202 ADC enable mask. | |
| static bool | hasSpecialEnablement (PmicAdcBase::Channel ch) |
| AXP202 does not require special channel enablement. | |
| static bool | enableSpecialChannel (AXP202Core &core, PmicAdcBase::Channel ch) |
| No special enablement needed for AXP202. | |
| static bool | disableSpecialChannel (AXP202Core &core, PmicAdcBase::Channel ch) |
| No special disablement needed for AXP202. | |
| static bool | readChannel (AXP202Core &core, PmicAdcBase::Channel ch, float &out) |
| Read a single ADC channel value for AXP202. | |
Static Public Attributes | |
| static constexpr uint8_t | ADC_EN1_ADDR = axp202_regs::adc::ADC_EN1 |
| static constexpr uint8_t | ADC_EN2_ADDR = axp202_regs::adc::ADC_EN2 |
AXP202 ADC traits specialization.
Implements the AdcTraitsBase interface for AXP202, providing:
Definition at line 60 of file AXP202AdcTraits.hpp.
|
inlinestatic |
No special disablement needed for AXP202.
Definition at line 93 of file AXP202AdcTraits.hpp.
|
inlinestatic |
No special enablement needed for AXP202.
Definition at line 83 of file AXP202AdcTraits.hpp.
|
inlinestatic |
Map PmicAdcBase::Channel to AXP202 ADC enable mask.
Definition at line 42 of file AXP202AdcTraits_impl.hpp.
References PmicAdcBase::ACIN_CURRENT, PmicAdcBase::ACIN_VOLTAGE, PmicAdcBase::BAT_CURRENT, PmicAdcBase::BAT_PERCENTAGE, PmicAdcBase::BAT_VOLTAGE, PmicAdcBase::DIE_TEMPERATURE, PmicAdcBase::VBUS_CURRENT, PmicAdcBase::VBUS_VOLTAGE, and PmicAdcBase::VSYS_VOLTAGE.
|
inlinestatic |
AXP202 does not require special channel enablement.
Definition at line 74 of file AXP202AdcTraits.hpp.
|
inlinestatic |
Read a single ADC channel value for AXP202.
Definition at line 75 of file AXP202AdcTraits_impl.hpp.
References axp202_regs::adc::APS_AVERVOL_H, axp202_regs::adc::APS_AVERVOL_L, axp202_regs::adc::BAT_AVERCHGCUR_H, axp202_regs::adc::BAT_AVERCHGCUR_L, axp202_regs::adc::BAT_AVERDISCHGCUR_H, axp202_regs::adc::BAT_AVERDISCHGCUR_L, axp202_regs::adc::BAT_AVERVOL_H, axp202_regs::adc::BAT_AVERVOL_L, PmicAdcBase::BAT_CURRENT, PmicAdcBase::BAT_PERCENTAGE, PmicAdcBase::BAT_TEMPERATURE, PmicAdcBase::BAT_VOLTAGE, axp202_regs::adc::BATT_PERCENTAGE, PmicAdcBase::DIE_TEMPERATURE, axp202_regs::factory::FACTORY_APS_VOLTAGE, axp202_regs::factory::FACTORY_BAT_CURRENT, axp202_regs::factory::FACTORY_INTERNAL_OFFSET, axp202_regs::factory::FACTORY_INTERNAL_TEMP, axp202_regs::factory::FACTORY_VBAT_VOLTAGE, axp202_regs::factory::FACTORY_VBUS_CURRENT, axp202_regs::factory::FACTORY_VBUS_VOLTAGE, axp202_regs::adc::INTERNAL_TEMP_H, axp202_regs::adc::INTERNAL_TEMP_L, axp202_regs::bmu::MODE_CHGSTATUS, SensorCommWrapper::readReg(), axp202_regs::bmu::STATUS, axp202_regs::adc::VBUS_CUR_H, axp202_regs::adc::VBUS_CUR_L, PmicAdcBase::VBUS_CURRENT, axp202_regs::adc::VBUS_VOL_H, axp202_regs::adc::VBUS_VOL_L, PmicAdcBase::VBUS_VOLTAGE, and PmicAdcBase::VSYS_VOLTAGE.
|
staticconstexpr |
Definition at line 63 of file AXP202AdcTraits.hpp.
|
staticconstexpr |
Definition at line 64 of file AXP202AdcTraits.hpp.