|
SensorLib 0.5.0
Multi-platform sensor driver library for Arduino, PlatformIO, and ESP-IDF
|
AXP192 ADC traits specialization. More...
#include <AXP192AdcTraits.hpp>
Static Public Member Functions | |
| static uint32_t | getChannelMask (PmicAdcBase::Channel ch) |
| Map PmicAdcBase::Channel to AXP192 ADC enable mask. | |
| static bool | hasSpecialEnablement (PmicAdcBase::Channel ch) |
| AXP192 does not require special channel enablement. | |
| static bool | enableSpecialChannel (AXP192Core &core, PmicAdcBase::Channel ch) |
| No special enablement needed for AXP192. | |
| static bool | disableSpecialChannel (AXP192Core &core, PmicAdcBase::Channel ch) |
| No special disablement needed for AXP192. | |
| static bool | readChannel (AXP192Core &core, PmicAdcBase::Channel ch, float &out) |
| Read a single ADC channel value for AXP192. | |
Static Public Attributes | |
| static constexpr uint8_t | ADC_EN1_ADDR = axp192_regs::adc::ADC_EN1 |
| static constexpr uint8_t | ADC_EN2_ADDR = axp192_regs::adc::ADC_EN2 |
AXP192 ADC traits specialization.
Implements the AdcTraitsBase interface for AXP192, providing:
Definition at line 57 of file AXP192AdcTraits.hpp.
|
inlinestatic |
No special disablement needed for AXP192.
Definition at line 93 of file AXP192AdcTraits.hpp.
|
inlinestatic |
No special enablement needed for AXP192.
Definition at line 83 of file AXP192AdcTraits.hpp.
|
inlinestatic |
Map PmicAdcBase::Channel to AXP192 ADC enable mask.
Returns a bitmask to enable the corresponding ADC channel. Lower 8 bits go to ADC_EN1, upper 8 bits to ADC_EN2.
Definition at line 42 of file AXP192AdcTraits_impl.hpp.
References PmicAdcBase::ACIN_CURRENT, PmicAdcBase::ACIN_VOLTAGE, PmicAdcBase::BAT_CURRENT, PmicAdcBase::BAT_VOLTAGE, PmicAdcBase::DIE_TEMPERATURE, PmicAdcBase::VBUS_CURRENT, PmicAdcBase::VBUS_VOLTAGE, and PmicAdcBase::VSYS_VOLTAGE.
|
inlinestatic |
AXP192 does not require special channel enablement.
Definition at line 74 of file AXP192AdcTraits.hpp.
|
inlinestatic |
Read a single ADC channel value for AXP192.
Implements channel-specific register reads, device state checks, and ADC value conversion using the AXP192's conversion factors.
| core | Reference to AXP192Core |
| ch | Channel to read |
| out | Reference to output float |
Definition at line 79 of file AXP192AdcTraits_impl.hpp.
References axp192_regs::ac::ACIN_CUR_H8, axp192_regs::ac::ACIN_CUR_L4, PmicAdcBase::ACIN_CURRENT, axp192_regs::factory::ACIN_CURRENT_STEP, axp192_regs::ac::ACIN_VOL_H8, axp192_regs::ac::ACIN_VOL_L4, PmicAdcBase::ACIN_VOLTAGE, axp192_regs::factory::ACIN_VOLTAGE_STEP, axp192_regs::adc::APS_AVERVOL_H8, axp192_regs::adc::APS_AVERVOL_L4, axp192_regs::factory::APS_VOLTAGE_STEP, axp192_regs::adc::BAT_AVERCHGCUR_H8, axp192_regs::adc::BAT_AVERCHGCUR_L5, axp192_regs::adc::BAT_AVERDISCHGCUR_H8, axp192_regs::adc::BAT_AVERDISCHGCUR_L5, axp192_regs::adc::BAT_AVERVOL_H8, axp192_regs::adc::BAT_AVERVOL_L4, axp192_regs::factory::BAT_CHARGE_CUR_STEP, PmicAdcBase::BAT_CURRENT, axp192_regs::factory::BAT_DISCHARGE_CUR_STEP, PmicAdcBase::BAT_PERCENTAGE, PmicAdcBase::BAT_TEMPERATURE, PmicAdcBase::BAT_VOLTAGE, axp192_regs::factory::BAT_VOLTAGE_STEP, PmicAdcBase::DIE_TEMPERATURE, axp192_regs::adc::INTERNAL_TEMP_H8, axp192_regs::adc::INTERNAL_TEMP_L4, axp192_regs::factory::INTERNAL_TEMP_OFFSET, axp192_regs::factory::INTERNAL_TEMP_STEP, axp192_regs::bmu::MODE_CHGSTATUS, SensorCommWrapper::readReg(), axp192_regs::bmu::STATUS, axp192_regs::adc::VBUS_CUR_H8, axp192_regs::adc::VBUS_CUR_L4, PmicAdcBase::VBUS_CURRENT, axp192_regs::factory::VBUS_CURRENT_STEP, axp192_regs::adc::VBUS_VOL_H8, axp192_regs::adc::VBUS_VOL_L4, PmicAdcBase::VBUS_VOLTAGE, axp192_regs::factory::VBUS_VOLTAGE_STEP, and PmicAdcBase::VSYS_VOLTAGE.
|
staticconstexpr |
Definition at line 60 of file AXP192AdcTraits.hpp.
|
staticconstexpr |
Definition at line 61 of file AXP192AdcTraits.hpp.