ESPHome  2024.11.0
atm90e32_reg.h
Go to the documentation of this file.
1 #pragma once
2 
3 #include <cinttypes>
4 
5 namespace esphome {
6 namespace atm90e32 {
7 
8 /* STATUS REGISTERS */
9 static const uint16_t ATM90E32_REGISTER_METEREN = 0x00; // Metering Enable
10 static const uint16_t ATM90E32_REGISTER_CHANNELMAPI = 0x01; // Current Channel Mapping Configuration
11 static const uint16_t ATM90E32_REGISTER_CHANNELMAPU = 0x02; // Voltage Channel Mapping Configuration
12 static const uint16_t ATM90E32_REGISTER_SAGPEAKDETCFG = 0x05; // Sag and Peak Detector Period Configuration
13 static const uint16_t ATM90E32_REGISTER_OVTH = 0x06; // Over Voltage Threshold
14 static const uint16_t ATM90E32_REGISTER_ZXCONFIG = 0x07; // Zero-Crossing Config
15 static const uint16_t ATM90E32_REGISTER_SAGTH = 0x08; // Voltage Sag Th
16 static const uint16_t ATM90E32_REGISTER_PHASELOSSTH = 0x09; // Voltage Phase Losing Th
17 static const uint16_t ATM90E32_REGISTER_INWARNTH = 0x0A; // Neutral Current (Calculated) Warning Threshold
18 static const uint16_t ATM90E32_REGISTER_OITH = 0x0B; // Over Current Threshold
19 static const uint16_t ATM90E32_REGISTER_FREQLOTH = 0x0C; // Low Threshold for Frequency Detection
20 static const uint16_t ATM90E32_REGISTER_FREQHITH = 0x0D; // High Threshold for Frequency Detection
21 static const uint16_t ATM90E32_REGISTER_PMPWRCTRL = 0x0E; // Partial Measurement Mode Power Control
22 static const uint16_t ATM90E32_REGISTER_IRQ0MERGECFG = 0x0F; // IRQ0 Merge Configuration
23 
24 /* EMM STATUS REGISTERS */
25 static const uint16_t ATM90E32_REGISTER_SOFTRESET = 0x70; // Software Reset
26 static const uint16_t ATM90E32_REGISTER_EMMSTATE0 = 0x71; // EMM State 0
27 static const uint16_t ATM90E32_REGISTER_EMMSTATE1 = 0x72; // EMM State 1
28 static const uint16_t ATM90E32_REGISTER_EMMINTSTATE0 = 0x73; // EMM Interrupt Status 0
29 static const uint16_t ATM90E32_REGISTER_EMMINTSTATE1 = 0x74; // EMM Interrupt Status 1
30 static const uint16_t ATM90E32_REGISTER_EMMINTEN0 = 0x75; // EMM Interrupt Enable 0
31 static const uint16_t ATM90E32_REGISTER_EMMINTEN1 = 0x76; // EMM Interrupt Enable 1
32 static const uint16_t ATM90E32_REGISTER_LASTSPIDATA = 0x78; // Last Read/Write SPI Value
33 static const uint16_t ATM90E32_REGISTER_CRCERRSTATUS = 0x79; // CRC Error Status
34 static const uint16_t ATM90E32_REGISTER_CRCDIGEST = 0x7A; // CRC Digest
35 static const uint16_t ATM90E32_REGISTER_CFGREGACCEN = 0x7F; // Configure Register Access Enable
36 static const uint16_t ATM90E32_STATUS_S0_OIPHASEAST = 1 << 15; // Over current on phase A
37 static const uint16_t ATM90E32_STATUS_S0_OIPHASEBST = 1 << 14; // Over current on phase B
38 static const uint16_t ATM90E32_STATUS_S0_OIPHASECST = 1 << 13; // Over current on phase C
39 static const uint16_t ATM90E32_STATUS_S0_OVPHASEAST = 1 << 12; // Over voltage on phase A
40 static const uint16_t ATM90E32_STATUS_S0_OVPHASEBST = 1 << 11; // Over voltage on phase B
41 static const uint16_t ATM90E32_STATUS_S0_OVPHASECST = 1 << 10; // Over voltage on phase C
42 static const uint16_t ATM90E32_STATUS_S0_UREVWNST = 1 << 9; // Voltage Phase Sequence Error status
43 static const uint16_t ATM90E32_STATUS_S0_IREVWNST = 1 << 8; // Current Phase Sequence Error status
44 static const uint16_t ATM90E32_STATUS_S0_INOV0ST = 1 << 7; // Calculated N line current greater than INWarnTh reg
45 static const uint16_t ATM90E32_STATUS_S0_TQNOLOADST = 1 << 6; // All phase sum reactive power no-load condition status
46 static const uint16_t ATM90E32_STATUS_S0_TPNOLOADST = 1 << 5; // All phase sum active power no-load condition status
47 static const uint16_t ATM90E32_STATUS_S0_TASNOLOADST = 1 << 4; // All phase sum apparent power no-load status
48 static const uint16_t ATM90E32_STATUS_S0_CF1REVST = 1 << 3; // Energy for CF1 Forward/Reverse status
49 static const uint16_t ATM90E32_STATUS_S0_CF2REVST = 1 << 2; // Energy for CF2 Forward/Reverse status
50 static const uint16_t ATM90E32_STATUS_S0_CF3REVST = 1 << 1; // Energy for CF3 Forward/Reverse status
51 static const uint16_t ATM90E32_STATUS_S0_CF4REVST = 1 << 0; // Energy for CF4 Forward/Reverse status
52 static const uint16_t ATM90E32_STATUS_S1_FREQHIST = 1 << 15; // Frequency is greater than the high threshold
53 static const uint16_t ATM90E32_STATUS_S1_SAGPHASEAST = 1 << 14; // Voltage sag on phase A
54 static const uint16_t ATM90E32_STATUS_S1_SAGPHASEBST = 1 << 13; // Voltage sag on phase B
55 static const uint16_t ATM90E32_STATUS_S1_SAGPHASECST = 1 << 12; // Voltage sag on phase C
56 static const uint16_t ATM90E32_STATUS_S1_FREQLOST = 1 << 11; // Frequency is lesser than the low threshold
57 static const uint16_t ATM90E32_STATUS_S1_PHASELOSSAST = 1 << 10; // Phase loss in Phase A
58 static const uint16_t ATM90E32_STATUS_S1_PHASELOSSBST = 1 << 9; // Phase loss in Phase B
59 static const uint16_t ATM90E32_STATUS_S1_PHASELOSSCST = 1 << 8; // Phase loss in Phase C
60 static const uint16_t ATM90E32_STATUS_S1_QEREGTPST = 1 << 7; // ReActive Energy register of sum (T) Positive Status
61 static const uint16_t ATM90E32_STATUS_S1_QEREGAPST = 1 << 6; // ReActive Energy register of Channel A Positive Status
62 static const uint16_t ATM90E32_STATUS_S1_QEREGBPST = 1 << 5; // ReActive Energy register of Channel B Positive Status
63 static const uint16_t ATM90E32_STATUS_S1_QEREGCPST = 1 << 4; // ReActive Energy register of Channel C Positive Status
64 static const uint16_t ATM90E32_STATUS_S1_PEREGTPST = 1 << 3; // Active Energy register of sum (T) Positive Status
65 static const uint16_t ATM90E32_STATUS_S1_PEREGAPST = 1 << 2; // Active Energy register of Channel A Positive Status
66 static const uint16_t ATM90E32_STATUS_S1_PEREGBPST = 1 << 1; // Active Energy register of Channel B Positive Status
67 static const uint16_t ATM90E32_STATUS_S1_PEREGCPST = 1 << 0; // Active Energy register of Channel C Positive Status
68 
69 /* LOW POWER MODE REGISTERS - NOT USED */
70 static const uint16_t ATM90E32_REGISTER_DETECTCTRL = 0x10;
71 static const uint16_t ATM90E32_REGISTER_DETECTTH1 = 0x11;
72 static const uint16_t ATM90E32_REGISTER_DETECTTH2 = 0x12;
73 static const uint16_t ATM90E32_REGISTER_DETECTTH3 = 0x13;
74 static const uint16_t ATM90E32_REGISTER_PMOFFSETA = 0x14;
75 static const uint16_t ATM90E32_REGISTER_PMOFFSETB = 0x15;
76 static const uint16_t ATM90E32_REGISTER_PMOFFSETC = 0x16;
77 static const uint16_t ATM90E32_REGISTER_PMPGA = 0x17;
78 static const uint16_t ATM90E32_REGISTER_PMIRMSA = 0x18;
79 static const uint16_t ATM90E32_REGISTER_PMIRMSB = 0x19;
80 static const uint16_t ATM90E32_REGISTER_PMIRMSC = 0x1A;
81 static const uint16_t ATM90E32_REGISTER_PMCONFIG = 0x10B;
82 static const uint16_t ATM90E32_REGISTER_PMAVGSAMPLES = 0x1C;
83 static const uint16_t ATM90E32_REGISTER_PMIRMSLSB = 0x1D;
84 
85 /* CONFIGURATION REGISTERS */
86 static const uint16_t ATM90E32_REGISTER_PLCONSTH = 0x31; // High Word of PL_Constant
87 static const uint16_t ATM90E32_REGISTER_PLCONSTL = 0x32; // Low Word of PL_Constant
88 static const uint16_t ATM90E32_REGISTER_MMODE0 = 0x33; // Metering Mode Config
89 static const uint16_t ATM90E32_REGISTER_MMODE1 = 0x34; // PGA Gain Configuration for Current Channels
90 static const uint16_t ATM90E32_REGISTER_PSTARTTH = 0x35; // Startup Power Th (P)
91 static const uint16_t ATM90E32_REGISTER_QSTARTTH = 0x36; // Startup Power Th (Q)
92 static const uint16_t ATM90E32_REGISTER_SSTARTTH = 0x37; // Startup Power Th (S)
93 static const uint16_t ATM90E32_REGISTER_PPHASETH = 0x38; // Startup Power Accum Th (P)
94 static const uint16_t ATM90E32_REGISTER_QPHASETH = 0x39; // Startup Power Accum Th (Q)
95 static const uint16_t ATM90E32_REGISTER_SPHASETH = 0x3A; // Startup Power Accum Th (S)
96 
97 /* CALIBRATION REGISTERS */
98 static const uint16_t ATM90E32_REGISTER_POFFSETA = 0x41; // A Line Power Offset (P)
99 static const uint16_t ATM90E32_REGISTER_QOFFSETA = 0x42; // A Line Power Offset (Q)
100 static const uint16_t ATM90E32_REGISTER_POFFSETB = 0x43; // B Line Power Offset (P)
101 static const uint16_t ATM90E32_REGISTER_QOFFSETB = 0x44; // B Line Power Offset (Q)
102 static const uint16_t ATM90E32_REGISTER_POFFSETC = 0x45; // C Line Power Offset (P)
103 static const uint16_t ATM90E32_REGISTER_QOFFSETC = 0x46; // C Line Power Offset (Q)
104 static const uint16_t ATM90E32_REGISTER_PQGAINA = 0x47; // A Line Calibration Gain
105 static const uint16_t ATM90E32_REGISTER_PHIA = 0x48; // A Line Calibration Angle
106 static const uint16_t ATM90E32_REGISTER_PQGAINB = 0x49; // B Line Calibration Gain
107 static const uint16_t ATM90E32_REGISTER_PHIB = 0x4A; // B Line Calibration Angle
108 static const uint16_t ATM90E32_REGISTER_PQGAINC = 0x4B; // C Line Calibration Gain
109 static const uint16_t ATM90E32_REGISTER_PHIC = 0x4C; // C Line Calibration Angle
110 
111 /* FUNDAMENTAL/HARMONIC ENERGY CALIBRATION REGISTERS */
112 static const uint16_t ATM90E32_REGISTER_POFFSETAF = 0x51; // A Fund Power Offset (P)
113 static const uint16_t ATM90E32_REGISTER_POFFSETBF = 0x52; // B Fund Power Offset (P)
114 static const uint16_t ATM90E32_REGISTER_POFFSETCF = 0x53; // C Fund Power Offset (P)
115 static const uint16_t ATM90E32_REGISTER_PGAINAF = 0x54; // A Fund Power Gain (P)
116 static const uint16_t ATM90E32_REGISTER_PGAINBF = 0x55; // B Fund Power Gain (P)
117 static const uint16_t ATM90E32_REGISTER_PGAINCF = 0x56; // C Fund Power Gain (P)
118 
119 /* MEASUREMENT CALIBRATION REGISTERS */
120 static const uint16_t ATM90E32_REGISTER_UGAINA = 0x61; // A Voltage RMS Gain
121 static const uint16_t ATM90E32_REGISTER_IGAINA = 0x62; // A Current RMS Gain
122 static const uint16_t ATM90E32_REGISTER_UOFFSETA = 0x63; // A Voltage Offset
123 static const uint16_t ATM90E32_REGISTER_IOFFSETA = 0x64; // A Current Offset
124 static const uint16_t ATM90E32_REGISTER_UGAINB = 0x65; // B Voltage RMS Gain
125 static const uint16_t ATM90E32_REGISTER_IGAINB = 0x66; // B Current RMS Gain
126 static const uint16_t ATM90E32_REGISTER_UOFFSETB = 0x67; // B Voltage Offset
127 static const uint16_t ATM90E32_REGISTER_IOFFSETB = 0x68; // B Current Offset
128 static const uint16_t ATM90E32_REGISTER_UGAINC = 0x69; // C Voltage RMS Gain
129 static const uint16_t ATM90E32_REGISTER_IGAINC = 0x6A; // C Current RMS Gain
130 static const uint16_t ATM90E32_REGISTER_UOFFSETC = 0x6B; // C Voltage Offset
131 static const uint16_t ATM90E32_REGISTER_IOFFSETC = 0x6C; // C Current Offset
132 static const uint16_t ATM90E32_REGISTER_IOFFSETN = 0x6E; // N Current Offset
133 
134 /* ENERGY REGISTERS */
135 static const uint16_t ATM90E32_REGISTER_APENERGYT = 0x80; // Total Forward Active
136 static const uint16_t ATM90E32_REGISTER_APENERGY = 0x81; // Forward Active Reg Base
137 static const uint16_t ATM90E32_REGISTER_APENERGYA = 0x81; // A Forward Active
138 static const uint16_t ATM90E32_REGISTER_APENERGYB = 0x82; // B Forward Active
139 static const uint16_t ATM90E32_REGISTER_APENERGYC = 0x83; // C Forward Active
140 static const uint16_t ATM90E32_REGISTER_ANENERGYT = 0x84; // Total Reverse Active
141 static const uint16_t ATM90E32_REGISTER_ANENERGY = 0x85; // Reverse Active Reg Base
142 static const uint16_t ATM90E32_REGISTER_ANENERGYA = 0x85; // A Reverse Active
143 static const uint16_t ATM90E32_REGISTER_ANENERGYB = 0x86; // B Reverse Active
144 static const uint16_t ATM90E32_REGISTER_ANENERGYC = 0x87; // C Reverse Active
145 static const uint16_t ATM90E32_REGISTER_RPENERGYT = 0x88; // Total Forward Reactive
146 static const uint16_t ATM90E32_REGISTER_RPENERGYA = 0x89; // A Forward Reactive
147 static const uint16_t ATM90E32_REGISTER_RPENERGYB = 0x8A; // B Forward Reactive
148 static const uint16_t ATM90E32_REGISTER_RPENERGYC = 0x8B; // C Forward Reactive
149 static const uint16_t ATM90E32_REGISTER_RNENERGYT = 0x8C; // Total Reverse Reactive
150 static const uint16_t ATM90E32_REGISTER_RNENERGYA = 0x8D; // A Reverse Reactive
151 static const uint16_t ATM90E32_REGISTER_RNENERGYB = 0x8E; // B Reverse Reactive
152 static const uint16_t ATM90E32_REGISTER_RNENERGYC = 0x8F; // C Reverse Reactive
153 
154 static const uint16_t ATM90E32_REGISTER_SAENERGYT = 0x90; // Total Apparent Energy
155 static const uint16_t ATM90E32_REGISTER_SENERGYA = 0x91; // A Apparent Energy
156 static const uint16_t ATM90E32_REGISTER_SENERGYB = 0x92; // B Apparent Energy
157 static const uint16_t ATM90E32_REGISTER_SENERGYC = 0x93; // C Apparent Energy
158 
159 /* FUNDAMENTAL / HARMONIC ENERGY REGISTERS */
160 static const uint16_t ATM90E32_REGISTER_APENERGYTF = 0xA0; // Total Forward Fund. Energy
161 static const uint16_t ATM90E32_REGISTER_APENERGYAF = 0xA1; // A Forward Fund. Energy
162 static const uint16_t ATM90E32_REGISTER_APENERGYBF = 0xA2; // B Forward Fund. Energy
163 static const uint16_t ATM90E32_REGISTER_APENERGYCF = 0xA3; // C Forward Fund. Energy
164 static const uint16_t ATM90E32_REGISTER_ANENERGYTF = 0xA4; // Total Reverse Fund Energy
165 static const uint16_t ATM90E32_REGISTER_ANENERGYAF = 0xA5; // A Reverse Fund. Energy
166 static const uint16_t ATM90E32_REGISTER_ANENERGYBF = 0xA6; // B Reverse Fund. Energy
167 static const uint16_t ATM90E32_REGISTER_ANENERGYCF = 0xA7; // C Reverse Fund. Energy
168 static const uint16_t ATM90E32_REGISTER_APENERGYTH = 0xA8; // Total Forward Harm. Energy
169 static const uint16_t ATM90E32_REGISTER_APENERGYAH = 0xA9; // A Forward Harm. Energy
170 static const uint16_t ATM90E32_REGISTER_APENERGYBH = 0xAA; // B Forward Harm. Energy
171 static const uint16_t ATM90E32_REGISTER_APENERGYCH = 0xAB; // C Forward Harm. Energy
172 static const uint16_t ATM90E32_REGISTER_ANENERGYTH = 0xAC; // Total Reverse Harm. Energy
173 static const uint16_t ATM90E32_REGISTER_ANENERGYAH = 0xAD; // A Reverse Harm. Energy
174 static const uint16_t ATM90E32_REGISTER_ANENERGYBH = 0xAE; // B Reverse Harm. Energy
175 static const uint16_t ATM90E32_REGISTER_ANENERGYCH = 0xAF; // C Reverse Harm. Energy
176 
177 /* POWER & P.F. REGISTERS */
178 static const uint16_t ATM90E32_REGISTER_PMEANT = 0xB0; // Total Mean Power (P)
179 static const uint16_t ATM90E32_REGISTER_PMEAN = 0xB1; // Mean Power Reg Base (P)
180 static const uint16_t ATM90E32_REGISTER_PMEANA = 0xB1; // A Mean Power (P)
181 static const uint16_t ATM90E32_REGISTER_PMEANB = 0xB2; // B Mean Power (P)
182 static const uint16_t ATM90E32_REGISTER_PMEANC = 0xB3; // C Mean Power (P)
183 static const uint16_t ATM90E32_REGISTER_QMEANT = 0xB4; // Total Mean Power (Q)
184 static const uint16_t ATM90E32_REGISTER_QMEAN = 0xB5; // Mean Power Reg Base (Q)
185 static const uint16_t ATM90E32_REGISTER_QMEANA = 0xB5; // A Mean Power (Q)
186 static const uint16_t ATM90E32_REGISTER_QMEANB = 0xB6; // B Mean Power (Q)
187 static const uint16_t ATM90E32_REGISTER_QMEANC = 0xB7; // C Mean Power (Q)
188 static const uint16_t ATM90E32_REGISTER_SMEANT = 0xB8; // Total Mean Power (S)
189 static const uint16_t ATM90E32_REGISTER_SMEANA = 0xB9; // A Mean Power (S)
190 static const uint16_t ATM90E32_REGISTER_SMEANB = 0xBA; // B Mean Power (S)
191 static const uint16_t ATM90E32_REGISTER_SMEANC = 0xBB; // C Mean Power (S)
192 static const uint16_t ATM90E32_REGISTER_PFMEANT = 0xBC; // Mean Power Factor
193 static const uint16_t ATM90E32_REGISTER_PFMEAN = 0xBD; // Power Factor Reg Base
194 static const uint16_t ATM90E32_REGISTER_PFMEANA = 0xBD; // A Power Factor
195 static const uint16_t ATM90E32_REGISTER_PFMEANB = 0xBE; // B Power Factor
196 static const uint16_t ATM90E32_REGISTER_PFMEANC = 0xBF; // C Power Factor
197 
198 static const uint16_t ATM90E32_REGISTER_PMEANTLSB = 0xC0; // Lower Word (Tot. Act. Power)
199 static const uint16_t ATM90E32_REGISTER_PMEANLSB = 0xC1; // Lower Word Reg Base (Active Power)
200 static const uint16_t ATM90E32_REGISTER_PMEANALSB = 0xC1; // Lower Word (A Act. Power)
201 static const uint16_t ATM90E32_REGISTER_PMEANBLSB = 0xC2; // Lower Word (B Act. Power)
202 static const uint16_t ATM90E32_REGISTER_PMEANCLSB = 0xC3; // Lower Word (C Act. Power)
203 static const uint16_t ATM90E32_REGISTER_QMEANTLSB = 0xC4; // Lower Word (Tot. React. Power)
204 static const uint16_t ATM90E32_REGISTER_QMEANLSB = 0xC5; // Lower Word Reg Base (Reactive Power)
205 static const uint16_t ATM90E32_REGISTER_QMEANALSB = 0xC5; // Lower Word (A React. Power)
206 static const uint16_t ATM90E32_REGISTER_QMEANBLSB = 0xC6; // Lower Word (B React. Power)
207 static const uint16_t ATM90E32_REGISTER_QMEANCLSB = 0xC7; // Lower Word (C React. Power)
208 static const uint16_t ATM90E32_REGISTER_SAMEANTLSB = 0xC8; // Lower Word (Tot. App. Power)
209 static const uint16_t ATM90E32_REGISTER_SMEANALSB = 0xC9; // Lower Word (A App. Power)
210 static const uint16_t ATM90E32_REGISTER_SMEANBLSB = 0xCA; // Lower Word (B App. Power)
211 static const uint16_t ATM90E32_REGISTER_SMEANCLSB = 0xCB; // Lower Word (C App. Power)
212 
213 /* FUND/HARM POWER & V/I RMS REGISTERS */
214 static const uint16_t ATM90E32_REGISTER_PMEANTF = 0xD0; // Total Active Fund. Power
215 static const uint16_t ATM90E32_REGISTER_PMEANAF = 0xD1; // A Active Fund. Power
216 static const uint16_t ATM90E32_REGISTER_PMEANBF = 0xD2; // B Active Fund. Power
217 static const uint16_t ATM90E32_REGISTER_PMEANCF = 0xD3; // C Active Fund. Power
218 static const uint16_t ATM90E32_REGISTER_PMEANTH = 0xD4; // Total Active Harm. Power
219 static const uint16_t ATM90E32_REGISTER_PMEANH = 0xD5; // Active Harm. Power Reg Base
220 static const uint16_t ATM90E32_REGISTER_PMEANAH = 0xD5; // A Active Harm. Power
221 static const uint16_t ATM90E32_REGISTER_PMEANBH = 0xD6; // B Active Harm. Power
222 static const uint16_t ATM90E32_REGISTER_PMEANCH = 0xD7; // C Active Harm. Power
223 static const uint16_t ATM90E32_REGISTER_URMS = 0xD9; // RMS Voltage Reg Base
224 static const uint16_t ATM90E32_REGISTER_URMSA = 0xD9; // A RMS Voltage
225 static const uint16_t ATM90E32_REGISTER_URMSB = 0xDA; // B RMS Voltage
226 static const uint16_t ATM90E32_REGISTER_URMSC = 0xDB; // C RMS Voltage
227 static const uint16_t ATM90E32_REGISTER_IRMS = 0xDD; // RMS Current Reg Base
228 static const uint16_t ATM90E32_REGISTER_IRMSA = 0xDD; // A RMS Current
229 static const uint16_t ATM90E32_REGISTER_IRMSB = 0xDE; // B RMS Current
230 static const uint16_t ATM90E32_REGISTER_IRMSC = 0xDF; // C RMS Current
231 static const uint16_t ATM90E32_REGISTER_IRMSN = 0xD8; // Calculated N RMS Current
232 
233 static const uint16_t ATM90E32_REGISTER_PMEANTFLSB = 0xE0; // Lower Word (Tot. Act. Fund. Power)
234 static const uint16_t ATM90E32_REGISTER_PMEANAFLSB = 0xE1; // Lower Word (A Act. Fund. Power)
235 static const uint16_t ATM90E32_REGISTER_PMEANBFLSB = 0xE2; // Lower Word (B Act. Fund. Power)
236 static const uint16_t ATM90E32_REGISTER_PMEANCFLSB = 0xE3; // Lower Word (C Act. Fund. Power)
237 static const uint16_t ATM90E32_REGISTER_PMEANTHLSB = 0xE4; // Lower Word (Tot. Act. Harm. Power)
238 static const uint16_t ATM90E32_REGISTER_PMEANHLSB = 0xE5; // Lower Word (A Act. Harm. Power) Reg Base
239 static const uint16_t ATM90E32_REGISTER_PMEANAHLSB = 0xE5; // Lower Word (A Act. Harm. Power)
240 static const uint16_t ATM90E32_REGISTER_PMEANBHLSB = 0xE6; // Lower Word (B Act. Harm. Power)
241 static const uint16_t ATM90E32_REGISTER_PMEANCHLSB = 0xE7; // Lower Word (C Act. Harm. Power)
242 static const uint16_t ATM90E32_REGISTER_URMSLSB = 0xE9; // Lower Word RMS Voltage Reg Base
243 static const uint16_t ATM90E32_REGISTER_URMSALSB = 0xE9; // Lower Word (A RMS Voltage)
244 static const uint16_t ATM90E32_REGISTER_URMSBLSB = 0xEA; // Lower Word (B RMS Voltage)
245 static const uint16_t ATM90E32_REGISTER_URMSCLSB = 0xEB; // Lower Word (C RMS Voltage)
246 static const uint16_t ATM90E32_REGISTER_IRMSLSB = 0xED; // Lower Word RMS Current Reg Base
247 static const uint16_t ATM90E32_REGISTER_IRMSALSB = 0xED; // Lower Word (A RMS Current)
248 static const uint16_t ATM90E32_REGISTER_IRMSBLSB = 0xEE; // Lower Word (B RMS Current)
249 static const uint16_t ATM90E32_REGISTER_IRMSCLSB = 0xEF; // Lower Word (C RMS Current)
250 
251 /* THD, FREQUENCY, ANGLE & TEMPTEMP REGISTERS*/
252 static const uint16_t ATM90E32_REGISTER_UPEAKA = 0xF1; // A Voltage Peak
253 static const uint16_t ATM90E32_REGISTER_UPEAKB = 0xF2; // B Voltage Peak
254 static const uint16_t ATM90E32_REGISTER_UPEAKC = 0xF3; // C Voltage Peak
255 static const uint16_t ATM90E32_REGISTER_IPEAK = 0xF5; // Peak Current Reg Base
256 static const uint16_t ATM90E32_REGISTER_IPEAKA = 0xF5; // A Current Peak
257 static const uint16_t ATM90E32_REGISTER_IPEAKB = 0xF6; // B Current Peak
258 static const uint16_t ATM90E32_REGISTER_IPEAKC = 0xF7; // C Current Peak
259 static const uint16_t ATM90E32_REGISTER_FREQ = 0xF8; // Frequency
260 static const uint16_t ATM90E32_REGISTER_PANGLE = 0xF9; // Mean Phase Angle Reg Base
261 static const uint16_t ATM90E32_REGISTER_PANGLEA = 0xF9; // A Mean Phase Angle
262 static const uint16_t ATM90E32_REGISTER_PANGLEB = 0xFA; // B Mean Phase Angle
263 static const uint16_t ATM90E32_REGISTER_PANGLEC = 0xFB; // C Mean Phase Angle
264 static const uint16_t ATM90E32_REGISTER_TEMP = 0xFC; // Measured Temperature
265 static const uint16_t ATM90E32_REGISTER_UANGLEA = 0xFD; // A Voltage Phase Angle
266 static const uint16_t ATM90E32_REGISTER_UANGLEB = 0xFE; // B Voltage Phase Angle
267 static const uint16_t ATM90E32_REGISTER_UANGLEC = 0xFF; // C Voltage Phase Angle
268 
269 } // namespace atm90e32
270 } // namespace esphome
Implementation of SPI Controller mode.
Definition: a01nyub.cpp:7