SensorLib 0.5.0
Multi-platform sensor driver library for Arduino, PlatformIO, and ESP-IDF
Loading...
Searching...
No Matches
AXP192Adc.hpp
Go to the documentation of this file.
1
42#pragma once
43#include "AXP192Core.hpp"
44#include "../axp1xx/AXP1xxAdc.hpp"
45#include "AXP192AdcTraits.hpp"
46
56class AXP192Adc : public axp1xx::AXP1xxAdc<AXP192Core, axp1xx::AdcTraitsBase<AXP192Core>>
57{
58public:
59 // Hardware bitmask constants (for direct register control)
60 static constexpr uint32_t ADC_VBUS_VOLTAGE_HW = 0x08; // REG82H bit 3
61 static constexpr uint32_t ADC_VBUS_CURRENT_HW = 0x04; // REG82H bit 2
62 static constexpr uint32_t ADC_ACIN_VOLTAGE_HW = 0x20; // REG82H bit 5
63 static constexpr uint32_t ADC_ACIN_CURRENT_HW = 0x10; // REG82H bit 4
64 static constexpr uint32_t ADC_BAT_VOLTAGE_HW = 0x80; // REG82H bit 7
65 static constexpr uint32_t ADC_BAT_CURRENT_HW = 0x40; // REG82H bit 6
66 static constexpr uint32_t ADC_APS_VOLTAGE_HW = 0x02; // REG82H bit 1
67 static constexpr uint32_t ADC_TS_PIN_HW = 0x01; // REG82H bit 0
68 static constexpr uint32_t ADC_TEMPERATURE_HW = 0x8000; // REG83H bit 7
69
74 explicit AXP192Adc(AXP192Core &core)
75 : axp1xx::AXP1xxAdc<AXP192Core, axp1xx::AdcTraitsBase<AXP192Core>>(core) {}
76
77 ~AXP192Adc() = default;
78};
@license MIT License
@license MIT License
AXP192 ADC Interface (template wrapper)
Definition AXP192Adc.hpp:57
static constexpr uint32_t ADC_APS_VOLTAGE_HW
Definition AXP192Adc.hpp:66
static constexpr uint32_t ADC_VBUS_CURRENT_HW
Definition AXP192Adc.hpp:61
AXP192Adc(AXP192Core &core)
Construct ADC interface.
Definition AXP192Adc.hpp:74
static constexpr uint32_t ADC_ACIN_CURRENT_HW
Definition AXP192Adc.hpp:63
~AXP192Adc()=default
static constexpr uint32_t ADC_BAT_VOLTAGE_HW
Definition AXP192Adc.hpp:64
static constexpr uint32_t ADC_TEMPERATURE_HW
Definition AXP192Adc.hpp:68
static constexpr uint32_t ADC_VBUS_VOLTAGE_HW
Definition AXP192Adc.hpp:60
static constexpr uint32_t ADC_ACIN_VOLTAGE_HW
Definition AXP192Adc.hpp:62
static constexpr uint32_t ADC_BAT_CURRENT_HW
Definition AXP192Adc.hpp:65
static constexpr uint32_t ADC_TS_PIN_HW
Definition AXP192Adc.hpp:67
Generic ADC implementation for AXP1xx-based PMICs.
Definition AXP1xxAdc.hpp:52