
_M1_SPI_BUS         = 0
_M1_SPI_DEV         = 0
_M1_GPIO_PIN_PM0    = 16
_M1_GPIO_PIN_PM1    = 18
_M1_GPIO_PIN_IRQ0   = 13
_M1_REG_CONFIG      = { # calibrated 2019-05-20
        'MeterConstant':    1107692, # default 3200 imp/kWh
        'UoffsetA':         39654,
        'UoffsetB':         39756,
        'UoffsetC':         39416,
        'IoffsetA':         64621,
        'IoffsetB':         64621,
        'IoffsetC':         64621,
        'IoffsetN':         65536, # default 65536
        'PoffsetA':         0,
        'QoffsetA':         0,
        'PoffsetB':         0,
        'QoffsetB':         0,
        'PoffsetC':         0,
        'QoffsetC':         0,
        'PoffsetAF':        0,
        'PoffsetBF':        0,
        'PoffsetCF':        0,
        'UgainA':           55526,
        'UgainB':           55479,
        'UgainC':           55336,
        'IgainA':           7864,
        'IgainB':           7864,
        'IgainC':           7902,
        'IgainN':           30000, # default 30000
        'GainA':            0,
        'PhiA':             0,
        'GainB':            0,
        'PhiB':             0,
        'GainC':            0,
        'PhiC':             0,
        'DFTVoltageScale':  0b01,
        'DFTCurrentScale':  0b011,
}
_M2_SPI_BUS         = 0
_M2_SPI_DEV         = 1
_M2_GPIO_PIN_PM0    = 12
_M2_GPIO_PIN_PM1    = 22
_M2_GPIO_PIN_IRQ0   = 15
_M2_REG_CONFIG      = {
        'MeterConstant':    1107692, # default 3200 imp/kWh
        'UoffsetA':         48937,
        'UoffsetB':         48888,
        'UoffsetC':         48901,
        'IoffsetA':         64621,
        'IoffsetB':         64621,
        'IoffsetC':         64621,
        'IoffsetN':         65536, # default 65536
        'PoffsetA':         0,
        'QoffsetA':         0,
        'PoffsetB':         0,
        'QoffsetB':         0,
        'PoffsetC':         0,
        'QoffsetC':         0,
        'PoffsetAF':        0,
        'PoffsetBF':        0,
        'PoffsetCF':        0,
        'UgainA':           54064,
        'UgainB':           54061,
        'UgainC':           54292,
        'IgainA':           7858,
        'IgainB':           8009,
        'IgainC':           7866,
        'IgainN':           30000, # default 30000
        'GainA':            0,
        'PhiA':             0,
        'GainB':            0,
        'PhiB':             0,
        'GainC':            0,
        'PhiC':             0,
        'DFTVoltageScale':  0b01,
        'DFTCurrentScale':  0b011,
}
