ESPHome 2025.5.0
Loading...
Searching...
No Matches
atm90e26_reg.h
Go to the documentation of this file.
1#pragma once
2
3namespace esphome {
4namespace atm90e26 {
5
6/* Status and Special Register */
7static const uint8_t ATM90E26_REGISTER_SOFTRESET = 0x00; // Software Reset
8static const uint8_t ATM90E26_REGISTER_SYSSTATUS = 0x01; // System Status
9static const uint8_t ATM90E26_REGISTER_FUNCEN = 0x02; // Function Enable
10static const uint8_t ATM90E26_REGISTER_SAGTH = 0x03; // Voltage Sag Threshold
11static const uint8_t ATM90E26_REGISTER_SMALLPMOD = 0x04; // Small-Power Mode
12static const uint8_t ATM90E26_REGISTER_LASTDATA = 0x06; // Last Read/Write SPI/UART Value
13
14/* Metering Calibration and Configuration Register */
15static const uint8_t ATM90E26_REGISTER_LSB = 0x08; // RMS/Power 16-bit LSB
16static const uint8_t ATM90E26_REGISTER_CALSTART = 0x20; // Calibration Start Command
17static const uint8_t ATM90E26_REGISTER_PLCONSTH = 0x21; // High Word of PL_Constant
18static const uint8_t ATM90E26_REGISTER_PLCONSTL = 0x22; // Low Word of PL_Constant
19static const uint8_t ATM90E26_REGISTER_LGAIN = 0x23; // L Line Calibration Gain
20static const uint8_t ATM90E26_REGISTER_LPHI = 0x24; // L Line Calibration Angle
21static const uint8_t ATM90E26_REGISTER_NGAIN = 0x25; // N Line Calibration Gain
22static const uint8_t ATM90E26_REGISTER_NPHI = 0x26; // N Line Calibration Angle
23static const uint8_t ATM90E26_REGISTER_PSTARTTH = 0x27; // Active Startup Power Threshold
24static const uint8_t ATM90E26_REGISTER_PNOLTH = 0x28; // Active No-Load Power Threshold
25static const uint8_t ATM90E26_REGISTER_QSTARTTH = 0x29; // Reactive Startup Power Threshold
26static const uint8_t ATM90E26_REGISTER_QNOLTH = 0x2A; // Reactive No-Load Power Threshold
27static const uint8_t ATM90E26_REGISTER_MMODE = 0x2B; // Metering Mode Configuration
28static const uint8_t ATM90E26_REGISTER_CS1 = 0x2C; // Checksum 1
29
30/* Measurement Calibration Register */
31static const uint8_t ATM90E26_REGISTER_ADJSTART = 0x30; // Measurement Calibration Start Command
32static const uint8_t ATM90E26_REGISTER_UGAIN = 0x31; // Voltage RMS Gain
33static const uint8_t ATM90E26_REGISTER_IGAINL = 0x32; // L Line Current RMS Gain
34static const uint8_t ATM90E26_REGISTER_IGAINN = 0x33; // N Line Current RMS Gain
35static const uint8_t ATM90E26_REGISTER_UOFFSET = 0x34; // Voltage Offset
36static const uint8_t ATM90E26_REGISTER_IOFFSETL = 0x35; // L Line Current Offset
37static const uint8_t ATM90E26_REGISTER_IOFFSETN = 0x36; // N Line Current Offse
38static const uint8_t ATM90E26_REGISTER_POFFSETL = 0x37; // L Line Active Power Offset
39static const uint8_t ATM90E26_REGISTER_QOFFSETL = 0x38; // L Line Reactive Power Offset
40static const uint8_t ATM90E26_REGISTER_POFFSETN = 0x39; // N Line Active Power Offset
41static const uint8_t ATM90E26_REGISTER_QOFFSETN = 0x3A; // N Line Reactive Power Offset
42static const uint8_t ATM90E26_REGISTER_CS2 = 0x3B; // Checksum 2
43
44/* Energy Register */
45static const uint8_t ATM90E26_REGISTER_APENERGY = 0x40; // Forward Active Energy
46static const uint8_t ATM90E26_REGISTER_ANENERGY = 0x41; // Reverse Active Energy
47static const uint8_t ATM90E26_REGISTER_ATENERGY = 0x42; // Absolute Active Energy
48static const uint8_t ATM90E26_REGISTER_RPENERGY = 0x43; // Forward (Inductive) Reactive Energy
49static const uint8_t ATM90E26_REGISTER_RNENERG = 0x44; // Reverse (Capacitive) Reactive Energy
50static const uint8_t ATM90E26_REGISTER_RTENERGY = 0x45; // Absolute Reactive Energy
51static const uint8_t ATM90E26_REGISTER_ENSTATUS = 0x46; // Metering Status
52
53/* Measurement Register */
54static const uint8_t ATM90E26_REGISTER_IRMS = 0x48; // L Line Current RMS
55static const uint8_t ATM90E26_REGISTER_URMS = 0x49; // Voltage RMS
56static const uint8_t ATM90E26_REGISTER_PMEAN = 0x4A; // L Line Mean Active Power
57static const uint8_t ATM90E26_REGISTER_QMEAN = 0x4B; // L Line Mean Reactive Power
58static const uint8_t ATM90E26_REGISTER_FREQ = 0x4C; // Voltage Frequency
59static const uint8_t ATM90E26_REGISTER_POWERF = 0x4D; // L Line Power Factor
60static const uint8_t ATM90E26_REGISTER_PANGLE = 0x4E; // Phase Angle between Voltage and L Line Current
61static const uint8_t ATM90E26_REGISTER_SMEAN = 0x4F; // L Line Mean Apparent Power
62static const uint8_t ATM90E26_REGISTER_IRMS2 = 0x68; // N Line Current rms
63static const uint8_t ATM90E26_REGISTER_PMEAN2 = 0x6A; // N Line Mean Active Power
64static const uint8_t ATM90E26_REGISTER_QMEAN2 = 0x6B; // N Line Mean Reactive Power
65static const uint8_t ATM90E26_REGISTER_POWERF2 = 0x6D; // N Line Power Factor
66static const uint8_t ATM90E26_REGISTER_PANGLE2 = 0x6E; // Phase Angle between Voltage and N Line Current
67static const uint8_t ATM90E26_REGISTER_SMEAN2 = 0x6F; // N Line Mean Apparent Power
68
69} // namespace atm90e26
70} // namespace esphome
Providing packet encoding functions for exchanging data with a remote host.
Definition a01nyub.cpp:7