SensorLib 0.5.0
Multi-platform sensor driver library for Arduino, PlatformIO, and ESP-IDF
Loading...
Searching...
No Matches
AXP2101Regs.hpp
Go to the documentation of this file.
1
31#pragma once
32#include <stdint.h>
33
35 struct bmu {
36 static constexpr uint8_t STATUS1 = 0x00;
37 static constexpr uint8_t STATUS2 = 0x01;
38 static constexpr uint8_t IC_TYPE = 0x03;
39 static constexpr uint8_t DATA_BUFFER1 = 0x04;
40 static constexpr uint8_t DATA_BUFFER2 = 0x05;
41 static constexpr uint8_t DATA_BUFFER3 = 0x06;
42 static constexpr uint8_t DATA_BUFFER4 = 0x07;
43 };
44
45 struct ctrl {
46 static constexpr uint8_t COMMON_CFG = 0x10;
47 static constexpr uint8_t BATFET_CTRL = 0x12;
48 static constexpr uint8_t DIE_TEMP_CFG = 0x13;
49 static constexpr uint8_t MIN_SYS_VOLTAGE = 0x14;
50 static constexpr uint8_t INPUT_VOLT_LIMIT = 0x15;
51 static constexpr uint8_t INPUT_CURR_LIMIT = 0x16;
52 static constexpr uint8_t RESET_FUEL_GAUGE = 0x17;
53 static constexpr uint8_t MODULE_EN = 0x18;
54 static constexpr uint8_t WDT_CTRL = 0x19;
55 static constexpr uint8_t LOW_BAT_WARN_SET = 0x1A;
56 };
57
58 struct pmu {
59 static constexpr uint8_t PWRON_STATUS = 0x20;
60 static constexpr uint8_t PWROFF_STATUS = 0x21;
61 static constexpr uint8_t PWROFF_EN = 0x22;
62 static constexpr uint8_t DC_OVP_UVP_CTRL = 0x23;
63 static constexpr uint8_t VOFF_SET = 0x24;
64 static constexpr uint8_t PWROK_SEQU_CTRL = 0x25;
65 static constexpr uint8_t SLEEP_WAKEUP_CTRL = 0x26;
66 static constexpr uint8_t IRQ_OFF_ON_LEVEL = 0x27;
67 static constexpr uint8_t FAST_PWRON_SET0 = 0x28;
68 static constexpr uint8_t FAST_PWRON_SET1 = 0x29;
69 static constexpr uint8_t FAST_PWRON_SET2 = 0x2A;
70 static constexpr uint8_t FAST_PWRON_CTRL = 0x2B;
71 };
72
73 struct adc {
74 static constexpr uint8_t CHANNEL_CTRL = 0x30;
75 static constexpr uint8_t BAT_VOLT_H = 0x34;
76 static constexpr uint8_t BAT_VOLT_L = 0x35;
77 static constexpr uint8_t TS_VOLT_H = 0x36;
78 static constexpr uint8_t TS_VOLT_L = 0x37;
79 static constexpr uint8_t VBUS_VOLT_H = 0x38;
80 static constexpr uint8_t VBUS_VOLT_L = 0x39;
81 static constexpr uint8_t VSYS_VOLT_H = 0x3A;
82 static constexpr uint8_t VSYS_VOLT_L = 0x3B;
83 static constexpr uint8_t DIE_TEMP_H = 0x3C;
84 static constexpr uint8_t DIE_TEMP_L = 0x3D;
85 };
86
87 struct irq {
88 static constexpr uint8_t ENABLE1 = 0x40;
89 static constexpr uint8_t ENABLE2 = 0x41;
90 static constexpr uint8_t ENABLE3 = 0x42;
91 static constexpr uint8_t STATUS1 = 0x48;
92 static constexpr uint8_t STATUS2 = 0x49;
93 static constexpr uint8_t STATUS3 = 0x4A;
94 };
95
96 struct ts {
97 static constexpr uint8_t TS_PIN_CTRL = 0x50;
98 static constexpr uint8_t HYSL2H = 0x52;
99 static constexpr uint8_t HYSH2L = 0x53;
100 };
101
102 struct jeita {
103 static constexpr uint8_t VLTF_CHG = 0x54;
104 static constexpr uint8_t VHTF_CHG = 0x55;
105 static constexpr uint8_t VLTF_WORK = 0x56;
106 static constexpr uint8_t VHTF_WORK = 0x57;
107 static constexpr uint8_t EN_CTRL = 0x58;
108 static constexpr uint8_t SET0 = 0x59;
109 static constexpr uint8_t SET1 = 0x5A;
110 static constexpr uint8_t SET2 = 0x5B;
111 };
112
113 struct chg {
114 static constexpr uint8_t IPRECHG_SET = 0x61;
115 static constexpr uint8_t ICC_SETTING = 0x62;
116 static constexpr uint8_t ITERM_CTRL = 0x63;
117 static constexpr uint8_t CV_CHG_VOLTAGE = 0x64;
118 static constexpr uint8_t THERMAL_REG_THRESH = 0x65;
119 static constexpr uint8_t CHG_TIMER_CFG = 0x67;
120 static constexpr uint8_t BAT_DETECT_CTRL = 0x68;
121 static constexpr uint8_t CHGLED_CFG = 0x69;
122 static constexpr uint8_t BTN_BAT_CHG_VOL = 0x6A;
123 };
124
125 struct dcdc {
126 static constexpr uint8_t ONOFF_DVM_CTRL = 0x80;
127 static constexpr uint8_t FORCE_PWM_CTRL = 0x81;
128 static constexpr uint8_t VOL0_CTRL = 0x82;
129 static constexpr uint8_t VOL1_CTRL = 0x83;
130 static constexpr uint8_t VOL2_CTRL = 0x84;
131 static constexpr uint8_t VOL3_CTRL = 0x85;
132 static constexpr uint8_t VOL4_CTRL = 0x86;
133 };
134
135 struct ldo {
136 static constexpr uint8_t ONOFF_CTRL0 = 0x90;
137 static constexpr uint8_t ONOFF_CTRL1 = 0x91;
138 static constexpr uint8_t VOL0_CTRL = 0x92;
139 static constexpr uint8_t VOL1_CTRL = 0x93;
140 static constexpr uint8_t VOL2_CTRL = 0x94;
141 static constexpr uint8_t VOL3_CTRL = 0x95;
142 static constexpr uint8_t VOL4_CTRL = 0x96;
143 static constexpr uint8_t VOL5_CTRL = 0x97;
144 static constexpr uint8_t VOL6_CTRL = 0x98;
145 static constexpr uint8_t VOL7_CTRL = 0x99;
146 static constexpr uint8_t VOL8_CTRL = 0x9A;
147 };
148
149 struct gauge {
150 static constexpr uint8_t BAT_PARAMS = 0xA1;
151 static constexpr uint8_t FUEL_GAUGE_CTRL = 0xA2;
152 static constexpr uint8_t BAT_PERCENT = 0xA4;
153 };
154
155 struct factory {
156 static constexpr float VBAT_STEP = 1.0f;
157 static constexpr float VBUS_STEP = 1.0f;
158 static constexpr float VSYS_STEP = 1.0f;
159 static constexpr float TS_STEP = 0.5f;
160 };
161
162 static constexpr uint8_t CHIP_ID = 0x4A;
163};
static constexpr uint8_t BAT_VOLT_L
static constexpr uint8_t DIE_TEMP_H
static constexpr uint8_t TS_VOLT_H
static constexpr uint8_t VSYS_VOLT_H
static constexpr uint8_t DIE_TEMP_L
static constexpr uint8_t VBUS_VOLT_H
static constexpr uint8_t VSYS_VOLT_L
static constexpr uint8_t TS_VOLT_L
static constexpr uint8_t VBUS_VOLT_L
static constexpr uint8_t BAT_VOLT_H
static constexpr uint8_t CHANNEL_CTRL
static constexpr uint8_t DATA_BUFFER4
static constexpr uint8_t STATUS2
static constexpr uint8_t DATA_BUFFER3
static constexpr uint8_t IC_TYPE
static constexpr uint8_t DATA_BUFFER2
static constexpr uint8_t DATA_BUFFER1
static constexpr uint8_t STATUS1
static constexpr uint8_t BAT_DETECT_CTRL
static constexpr uint8_t CV_CHG_VOLTAGE
static constexpr uint8_t ITERM_CTRL
static constexpr uint8_t ICC_SETTING
static constexpr uint8_t BTN_BAT_CHG_VOL
static constexpr uint8_t CHG_TIMER_CFG
static constexpr uint8_t CHGLED_CFG
static constexpr uint8_t THERMAL_REG_THRESH
static constexpr uint8_t IPRECHG_SET
static constexpr uint8_t WDT_CTRL
static constexpr uint8_t LOW_BAT_WARN_SET
static constexpr uint8_t RESET_FUEL_GAUGE
static constexpr uint8_t COMMON_CFG
static constexpr uint8_t DIE_TEMP_CFG
static constexpr uint8_t MIN_SYS_VOLTAGE
static constexpr uint8_t INPUT_CURR_LIMIT
static constexpr uint8_t MODULE_EN
static constexpr uint8_t INPUT_VOLT_LIMIT
static constexpr uint8_t BATFET_CTRL
static constexpr uint8_t VOL0_CTRL
static constexpr uint8_t ONOFF_DVM_CTRL
static constexpr uint8_t VOL3_CTRL
static constexpr uint8_t VOL4_CTRL
static constexpr uint8_t VOL2_CTRL
static constexpr uint8_t VOL1_CTRL
static constexpr uint8_t FORCE_PWM_CTRL
static constexpr float TS_STEP
static constexpr float VBAT_STEP
static constexpr float VSYS_STEP
static constexpr float VBUS_STEP
static constexpr uint8_t BAT_PARAMS
static constexpr uint8_t FUEL_GAUGE_CTRL
static constexpr uint8_t BAT_PERCENT
static constexpr uint8_t STATUS3
static constexpr uint8_t ENABLE3
static constexpr uint8_t ENABLE1
static constexpr uint8_t STATUS2
static constexpr uint8_t ENABLE2
static constexpr uint8_t STATUS1
static constexpr uint8_t SET1
static constexpr uint8_t SET2
static constexpr uint8_t SET0
static constexpr uint8_t EN_CTRL
static constexpr uint8_t VLTF_CHG
static constexpr uint8_t VHTF_CHG
static constexpr uint8_t VLTF_WORK
static constexpr uint8_t VHTF_WORK
static constexpr uint8_t VOL8_CTRL
static constexpr uint8_t ONOFF_CTRL1
static constexpr uint8_t VOL0_CTRL
static constexpr uint8_t VOL5_CTRL
static constexpr uint8_t VOL7_CTRL
static constexpr uint8_t VOL4_CTRL
static constexpr uint8_t VOL3_CTRL
static constexpr uint8_t VOL2_CTRL
static constexpr uint8_t ONOFF_CTRL0
static constexpr uint8_t VOL6_CTRL
static constexpr uint8_t VOL1_CTRL
static constexpr uint8_t FAST_PWRON_CTRL
static constexpr uint8_t FAST_PWRON_SET2
static constexpr uint8_t PWROK_SEQU_CTRL
static constexpr uint8_t DC_OVP_UVP_CTRL
static constexpr uint8_t FAST_PWRON_SET0
static constexpr uint8_t PWROFF_EN
static constexpr uint8_t FAST_PWRON_SET1
static constexpr uint8_t PWRON_STATUS
static constexpr uint8_t IRQ_OFF_ON_LEVEL
static constexpr uint8_t SLEEP_WAKEUP_CTRL
static constexpr uint8_t PWROFF_STATUS
static constexpr uint8_t VOFF_SET
static constexpr uint8_t HYSH2L
static constexpr uint8_t TS_PIN_CTRL
static constexpr uint8_t HYSL2H
static constexpr uint8_t CHIP_ID