def __init__(self, dev: SMBusDevice):
     RegisterManager.__init__(self, dev, True)
     self.ctrl1 = self.Ctrl1Register(self)
     self.registers.append(self.ctrl1)
     self.ctrl2 = self.Ctrl2Register(self)
     self.registers.append(self.ctrl2)
     self.ctrl3 = self.Ctrl3Register(self)
     self.registers.append(self.ctrl3)
     self.ctrl4 = self.Ctrl4Register(self)
     self.registers.append(self.ctrl4)
     self.ctrl5 = self.Ctrl5Register(self)
     self.registers.append(self.ctrl5)
     self.ctrl6 = self.Ctrl6Register(self)
     self.registers.append(self.ctrl6)
     self.reference = self.ReferenceRegister(self)
     self.registers.append(self.reference)
     self.status = self.StatusRegister(self)
     self.registers.append(self.status)
     self.fifoControl = self.FifoControlRegister(self)
     self.registers.append(self.fifoControl)
     self.fifoSource = self.FifoSourceRegister(self)
     self.registers.append(self.fifoSource)
     self.inertialIntGen1Config = self.InertialIntGen1ConfigRegister(self)
     self.registers.append(self.inertialIntGen1Config)
     self.inertialIntGen1Status = self.InertialIntGen1StatusRegister(self)
     self.registers.append(self.inertialIntGen1Status)
     self.inertialIntGen1Threshold = self.InertialIntGen1ThresholdRegister(
         self)
     self.registers.append(self.inertialIntGen1Threshold)
     self.inertialIntGen1Duration = self.InertialIntGen1DurationRegister(
         self)
     self.registers.append(self.inertialIntGen1Duration)
     self.inertialIntGen2Config = self.InertialIntGen2ConfigRegister(self)
     self.registers.append(self.inertialIntGen2Config)
     self.inertialIntGen2Status = self.InertialIntGen2StatusRegister(self)
     self.registers.append(self.inertialIntGen2Status)
     self.inertialIntGen2Threshold = self.InertialIntGen2ThresholdRegister(
         self)
     self.registers.append(self.inertialIntGen2Threshold)
     self.inertialIntGen2Duration = self.InertialIntGen2DurationRegister(
         self)
     self.registers.append(self.inertialIntGen2Duration)
     self.clickConfig = self.ClickConfigRegister(self)
     self.registers.append(self.clickConfig)
     self.clickSource = self.ClickSourceRegister(self)
     self.registers.append(self.clickSource)
     self.clickThreshold = self.ClickThresholdRegister(self)
     self.registers.append(self.clickThreshold)
     self.timeLimit = self.TimeLimitRegister(self)
     self.registers.append(self.timeLimit)
     self.timeLatency = self.TimeLatencyRegister(self)
     self.registers.append(self.timeLatency)
     self.timeWindow = self.TimeWindowRegister(self)
     self.registers.append(self.timeWindow)
     self.outAccelX = self.OutAccelXRegister(self)
     self.registers.append(self.outAccelX)
     self.outAccelY = self.OutAccelYRegister(self)
     self.registers.append(self.outAccelY)
     self.outAccelZ = self.OutAccelZRegister(self)
     self.registers.append(self.outAccelZ)
Exemplo n.º 2
0
 def __init__(self, dev: SMBusDevice):
     RegisterManager.__init__(self, dev, True)
     self.enable = self.EnableRegister(self)
     self.registers.append(self.enable)
     self.config = self.ConfigRegister(self)
     self.registers.append(self.config)
     self.interruptLowThreshold = self.InterruptLowThresholdRegister(self)
     self.registers.append(self.interruptLowThreshold)
     self.interruptHighThreshold = self.InterruptHighThresholdRegister(self)
     self.registers.append(self.interruptHighThreshold)
     self.noPersistLowThreshold = self.NoPersistLowThresholdRegister(self)
     self.registers.append(self.noPersistLowThreshold)
     self.noPersistHighThreshold = self.NoPersistHighThresholdRegister(self)
     self.registers.append(self.noPersistHighThreshold)
     self.persist = self.PersistRegister(self)
     self.registers.append(self.persist)
     self.packageId = self.PackageIdRegister(self)
     self.registers.append(self.packageId)
     self.deviceId = self.DeviceIdRegister(self)
     self.registers.append(self.deviceId)
     self.status = self.StatusRegister(self)
     self.registers.append(self.status)
     self.ch0 = self.Ch0Register(self)
     self.registers.append(self.ch0)
     self.ch1 = self.Ch1Register(self)
     self.registers.append(self.ch1)
Exemplo n.º 3
0
 def __init__(self, dev: SMBusDevice):
     RegisterManager.__init__(self, dev, True)
     self.command = self.CommandRegister(self)
     self.registers.append(self.command)
     self.productId = self.ProductIdRegister(self)
     self.registers.append(self.productId)
     self.proximityRate = self.ProximityRateRegister(self)
     self.registers.append(self.proximityRate)
     self.ledCurrent = self.LedCurrentRegister(self)
     self.registers.append(self.ledCurrent)
     self.ambientLightParameters = self.AmbientLightParametersRegister(self)
     self.registers.append(self.ambientLightParameters)
     self.ambientLightResult = self.AmbientLightResultRegister(self)
     self.registers.append(self.ambientLightResult)
     self.proximityResult = self.ProximityResultRegister(self)
     self.registers.append(self.proximityResult)
     self.interruptControl = self.InterruptControlRegister(self)
     self.registers.append(self.interruptControl)
     self.lowThreshold = self.LowThresholdRegister(self)
     self.registers.append(self.lowThreshold)
     self.highThreshold = self.HighThresholdRegister(self)
     self.registers.append(self.highThreshold)
     self.interruptStatus = self.InterruptStatusRegister(self)
     self.registers.append(self.interruptStatus)
     self.proxModulatorTimingAdustment = self.ProxModulatorTimingAdustmentRegister(
         self)
     self.registers.append(self.proxModulatorTimingAdustment)
Exemplo n.º 4
0
 def __init__(self, dev: SMBusDevice):
     RegisterManager.__init__(self, dev, True)
     self.t1 = self.T1Register(self)
     self.registers.append(self.t1)
     self.t2 = self.T2Register(self)
     self.registers.append(self.t2)
     self.t3 = self.T3Register(self)
     self.registers.append(self.t3)
     self.p1 = self.P1Register(self)
     self.registers.append(self.p1)
     self.p2 = self.P2Register(self)
     self.registers.append(self.p2)
     self.p3 = self.P3Register(self)
     self.registers.append(self.p3)
     self.p4 = self.P4Register(self)
     self.registers.append(self.p4)
     self.p5 = self.P5Register(self)
     self.registers.append(self.p5)
     self.p6 = self.P6Register(self)
     self.registers.append(self.p6)
     self.p7 = self.P7Register(self)
     self.registers.append(self.p7)
     self.p8 = self.P8Register(self)
     self.registers.append(self.p8)
     self.p9 = self.P9Register(self)
     self.registers.append(self.p9)
     self.h1 = self.H1Register(self)
     self.registers.append(self.h1)
     self.id = self.IdRegister(self)
     self.registers.append(self.id)
     self.reset = self.ResetRegister(self)
     self.registers.append(self.reset)
     self.h2 = self.H2Register(self)
     self.registers.append(self.h2)
     self.h3 = self.H3Register(self)
     self.registers.append(self.h3)
     self.h4 = self.H4Register(self)
     self.registers.append(self.h4)
     self.h4h5 = self.H4h5Register(self)
     self.registers.append(self.h4h5)
     self.h5 = self.H5Register(self)
     self.registers.append(self.h5)
     self.h6 = self.H6Register(self)
     self.registers.append(self.h6)
     self.ctrlHumidity = self.CtrlHumidityRegister(self)
     self.registers.append(self.ctrlHumidity)
     self.status = self.StatusRegister(self)
     self.registers.append(self.status)
     self.ctrlMeasure = self.CtrlMeasureRegister(self)
     self.registers.append(self.ctrlMeasure)
     self.config = self.ConfigRegister(self)
     self.registers.append(self.config)
     self.pressure = self.PressureRegister(self)
     self.registers.append(self.pressure)
     self.temperature = self.TemperatureRegister(self)
     self.registers.append(self.temperature)
     self.humidity = self.HumidityRegister(self)
     self.registers.append(self.humidity)
Exemplo n.º 5
0
 def __init__(self, dev: SMBusDevice):
     RegisterManager.__init__(self, dev, True)
     self.conversion = self.ConversionRegister(self)
     self.registers.append(self.conversion)
     self.config = self.ConfigRegister(self)
     self.registers.append(self.config)
     self.lowThreshold = self.LowThresholdRegister(self)
     self.registers.append(self.lowThreshold)
     self.highThreshold = self.HighThresholdRegister(self)
     self.registers.append(self.highThreshold)
Exemplo n.º 6
0
 def __init__(self, dev: SMBusDevice):
     RegisterManager.__init__(self, dev, True)
     self.powerCtl = self.PowerCtlRegister(self)
     self.registers.append(self.powerCtl)
     self.dataFormat = self.DataFormatRegister(self)
     self.registers.append(self.dataFormat)
     self.dataX = self.DataXRegister(self)
     self.registers.append(self.dataX)
     self.dataY = self.DataYRegister(self)
     self.registers.append(self.dataY)
     self.dataZ = self.DataZRegister(self)
     self.registers.append(self.dataZ)
Exemplo n.º 7
0
 def __init__(self, dev: SMBusDevice):
     RegisterManager.__init__(self, dev, True)
     self.control = self.ControlRegister(self)
     self.registers.append(self.control)
     self.timing = self.TimingRegister(self)
     self.registers.append(self.timing)
     self.interruptThresholdLow = self.InterruptThresholdLowRegister(self)
     self.registers.append(self.interruptThresholdLow)
     self.interruptThresholdHigh = self.InterruptThresholdHighRegister(self)
     self.registers.append(self.interruptThresholdHigh)
     self.interruptControl = self.InterruptControlRegister(self)
     self.registers.append(self.interruptControl)
     self.id = self.IdRegister(self)
     self.registers.append(self.id)
     self.data0 = self.Data0Register(self)
     self.registers.append(self.data0)
     self.data1 = self.Data1Register(self)
     self.registers.append(self.data1)
Exemplo n.º 8
0
 def __init__(self, dev: SMBusDevice):
     RegisterManager.__init__(self, dev, True)
     self.puCtrl = self.PuCtrlRegister(self)
     self.registers.append(self.puCtrl)
     self.ctrl1 = self.Ctrl1Register(self)
     self.registers.append(self.ctrl1)
     self.ctrl2 = self.Ctrl2Register(self)
     self.registers.append(self.ctrl2)
     self.i2cCtrl = self.I2cCtrlRegister(self)
     self.registers.append(self.i2cCtrl)
     self.adcResult = self.AdcResultRegister(self)
     self.registers.append(self.adcResult)
     self.adc = self.AdcRegister(self)
     self.registers.append(self.adc)
     self.pga = self.PgaRegister(self)
     self.registers.append(self.pga)
     self.powerCtrl = self.PowerCtrlRegister(self)
     self.registers.append(self.powerCtrl)
Exemplo n.º 9
0
 def __init__(self, dev: SMBusDevice):
     RegisterManager.__init__(self, dev, True)
     self.tempOut = self.TempOutRegister(self)
     self.registers.append(self.tempOut)
     self.sr = self.SrRegister(self)
     self.registers.append(self.sr)
     self.cra = self.CraRegister(self)
     self.registers.append(self.cra)
     self.crb = self.CrbRegister(self)
     self.registers.append(self.crb)
     self.mr = self.MrRegister(self)
     self.registers.append(self.mr)
     self.outX = self.OutXRegister(self)
     self.registers.append(self.outX)
     self.outY = self.OutYRegister(self)
     self.registers.append(self.outY)
     self.outZ = self.OutZRegister(self)
     self.registers.append(self.outZ)
Exemplo n.º 10
0
 def __init__(self, dev: SMBusDevice):
     RegisterManager.__init__(self, dev, True)
     self.whoAmI = self.WhoAmIRegister(self)
     self.registers.append(self.whoAmI)
     self.ctrlReg1 = self.CtrlReg1Register(self)
     self.registers.append(self.ctrlReg1)
     self.ctrlReg2 = self.CtrlReg2Register(self)
     self.registers.append(self.ctrlReg2)
     self.ctrlReg3 = self.CtrlReg3Register(self)
     self.registers.append(self.ctrlReg3)
     self.ctrlReg4 = self.CtrlReg4Register(self)
     self.registers.append(self.ctrlReg4)
     self.ctrlReg5 = self.CtrlReg5Register(self)
     self.registers.append(self.ctrlReg5)
     self.referenceDataCapture = self.ReferenceDataCaptureRegister(self)
     self.registers.append(self.referenceDataCapture)
     self.outTemp = self.OutTempRegister(self)
     self.registers.append(self.outTemp)
     self.status = self.StatusRegister(self)
     self.registers.append(self.status)
     self.fifoCtrl = self.FifoCtrlRegister(self)
     self.registers.append(self.fifoCtrl)
     self.fifoSrc = self.FifoSrcRegister(self)
     self.registers.append(self.fifoSrc)
     self.intConfig = self.IntConfigRegister(self)
     self.registers.append(self.intConfig)
     self.int1Src = self.Int1SrcRegister(self)
     self.registers.append(self.int1Src)
     self.int1ThresholdX = self.Int1ThresholdXRegister(self)
     self.registers.append(self.int1ThresholdX)
     self.int1ThresholdY = self.Int1ThresholdYRegister(self)
     self.registers.append(self.int1ThresholdY)
     self.int1ThresholdZ = self.Int1ThresholdZRegister(self)
     self.registers.append(self.int1ThresholdZ)
     self.int1Duration = self.Int1DurationRegister(self)
     self.registers.append(self.int1Duration)
     self.outX = self.OutXRegister(self)
     self.registers.append(self.outX)
     self.outY = self.OutYRegister(self)
     self.registers.append(self.outY)
     self.outZ = self.OutZRegister(self)
     self.registers.append(self.outZ)
Exemplo n.º 11
0
 def __init__(self, dev: SMBusDevice):
     RegisterManager.__init__(self, dev, True)
     self.whoAmI = self.WhoAmIRegister(self)
     self.registers.append(self.whoAmI)
     self.smplrtDiv = self.SmplrtDivRegister(self)
     self.registers.append(self.smplrtDiv)
     self.dlpfFs = self.DlpfFsRegister(self)
     self.registers.append(self.dlpfFs)
     self.intCfg = self.IntCfgRegister(self)
     self.registers.append(self.intCfg)
     self.intStatus = self.IntStatusRegister(self)
     self.registers.append(self.intStatus)
     self.temp = self.TempRegister(self)
     self.registers.append(self.temp)
     self.gyroX = self.GyroXRegister(self)
     self.registers.append(self.gyroX)
     self.gyroY = self.GyroYRegister(self)
     self.registers.append(self.gyroY)
     self.gyroZ = self.GyroZRegister(self)
     self.registers.append(self.gyroZ)
     self.pwrMgm = self.PwrMgmRegister(self)
     self.registers.append(self.pwrMgm)
Exemplo n.º 12
0
 def __init__(self, dev: SMBusDevice):
     RegisterManager.__init__(self, dev, True)
     self.wia = self.WiaRegister(self)
     self.registers.append(self.wia)
     self.info = self.InfoRegister(self)
     self.registers.append(self.info)
     self.status1 = self.Status1Register(self)
     self.registers.append(self.status1)
     self.hx = self.HxRegister(self)
     self.registers.append(self.hx)
     self.hy = self.HyRegister(self)
     self.registers.append(self.hy)
     self.hz = self.HzRegister(self)
     self.registers.append(self.hz)
     self.status2 = self.Status2Register(self)
     self.registers.append(self.status2)
     self.control = self.ControlRegister(self)
     self.registers.append(self.control)
     self.sensitivityX = self.SensitivityXRegister(self)
     self.registers.append(self.sensitivityX)
     self.sensitivityY = self.SensitivityYRegister(self)
     self.registers.append(self.sensitivityY)
     self.sensitivityZ = self.SensitivityZRegister(self)
     self.registers.append(self.sensitivityZ)
Exemplo n.º 13
0

{{#RegisterList}}
{{#Values.Values}}
{{#Enum}}
class {{PluralizedName}}:
{{#ValuesList}}
    {{Key}} = {{#Value}}{{Value}}{{/Value}}
{{/ValuesList}}
    
{{/Enum}}
{{/Values.Values}}
{{/RegisterList}}
class {{Name}}Registers(RegisterManager):
    def __init__(self, dev: SMBusDevice):
        RegisterManager.__init__(self, dev, {{MultiRegisterAccessCapitalized}})
        {{#RegisterList}}
        self.{{Name}} = self.{{CapitalizedName}}Register(self)
        self.registers.append(self.{{Name}})
        {{/RegisterList}}

{{#RegisterList}}
    class {{CapitalizedName}}Register(Register):
        def __init__(self, reg_manager: RegisterManager):
            Register.__init__(self, reg_manager, {{Address}}, {{NumBytes}}, {{IsBigEndianCapitalized}})
        {{#Values.Values}}
            self.{{Name}} = 0
        {{/Values.Values}}


        def read(self):
Exemplo n.º 14
0
 def __init__(self, dev: SMBusDevice):
     RegisterManager.__init__(self, dev, True)
     self.chipId = self.ChipIdRegister(self)
     self.registers.append(self.chipId)
     self.accelChipId = self.AccelChipIdRegister(self)
     self.registers.append(self.accelChipId)
     self.magChipId = self.MagChipIdRegister(self)
     self.registers.append(self.magChipId)
     self.gyroChipId = self.GyroChipIdRegister(self)
     self.registers.append(self.gyroChipId)
     self.swRevision = self.SwRevisionRegister(self)
     self.registers.append(self.swRevision)
     self.bootloaderVersion = self.BootloaderVersionRegister(self)
     self.registers.append(self.bootloaderVersion)
     self.pageId = self.PageIdRegister(self)
     self.registers.append(self.pageId)
     self.accelX = self.AccelXRegister(self)
     self.registers.append(self.accelX)
     self.accelY = self.AccelYRegister(self)
     self.registers.append(self.accelY)
     self.accelZ = self.AccelZRegister(self)
     self.registers.append(self.accelZ)
     self.magnetometerX = self.MagnetometerXRegister(self)
     self.registers.append(self.magnetometerX)
     self.magnetometerY = self.MagnetometerYRegister(self)
     self.registers.append(self.magnetometerY)
     self.magnetometerZ = self.MagnetometerZRegister(self)
     self.registers.append(self.magnetometerZ)
     self.gyroX = self.GyroXRegister(self)
     self.registers.append(self.gyroX)
     self.gyroY = self.GyroYRegister(self)
     self.registers.append(self.gyroY)
     self.gyroZ = self.GyroZRegister(self)
     self.registers.append(self.gyroZ)
     self.eulHeading = self.EulHeadingRegister(self)
     self.registers.append(self.eulHeading)
     self.eulRoll = self.EulRollRegister(self)
     self.registers.append(self.eulRoll)
     self.eulPitch = self.EulPitchRegister(self)
     self.registers.append(self.eulPitch)
     self.quaW = self.QuaWRegister(self)
     self.registers.append(self.quaW)
     self.quaX = self.QuaXRegister(self)
     self.registers.append(self.quaX)
     self.quaY = self.QuaYRegister(self)
     self.registers.append(self.quaY)
     self.quaZ = self.QuaZRegister(self)
     self.registers.append(self.quaZ)
     self.linX = self.LinXRegister(self)
     self.registers.append(self.linX)
     self.linY = self.LinYRegister(self)
     self.registers.append(self.linY)
     self.linZ = self.LinZRegister(self)
     self.registers.append(self.linZ)
     self.gravX = self.GravXRegister(self)
     self.registers.append(self.gravX)
     self.gravY = self.GravYRegister(self)
     self.registers.append(self.gravY)
     self.gravZ = self.GravZRegister(self)
     self.registers.append(self.gravZ)
     self.temp = self.TempRegister(self)
     self.registers.append(self.temp)
     self.calibStat = self.CalibStatRegister(self)
     self.registers.append(self.calibStat)
     self.selfTestResult = self.SelfTestResultRegister(self)
     self.registers.append(self.selfTestResult)
     self.interruptStatus = self.InterruptStatusRegister(self)
     self.registers.append(self.interruptStatus)
     self.sysClockStatus = self.SysClockStatusRegister(self)
     self.registers.append(self.sysClockStatus)
     self.sysStatus = self.SysStatusRegister(self)
     self.registers.append(self.sysStatus)
     self.sysErr = self.SysErrRegister(self)
     self.registers.append(self.sysErr)
     self.unitSel = self.UnitSelRegister(self)
     self.registers.append(self.unitSel)
     self.operatingMode = self.OperatingModeRegister(self)
     self.registers.append(self.operatingMode)
     self.powerMode = self.PowerModeRegister(self)
     self.registers.append(self.powerMode)
     self.sysTrigger = self.SysTriggerRegister(self)
     self.registers.append(self.sysTrigger)
     self.tempSource = self.TempSourceRegister(self)
     self.registers.append(self.tempSource)
     self.axisMapConfig = self.AxisMapConfigRegister(self)
     self.registers.append(self.axisMapConfig)
     self.axisMapSign = self.AxisMapSignRegister(self)
     self.registers.append(self.axisMapSign)
     self.accelOffsetX = self.AccelOffsetXRegister(self)
     self.registers.append(self.accelOffsetX)
     self.accelOffsetY = self.AccelOffsetYRegister(self)
     self.registers.append(self.accelOffsetY)
     self.accelOffsetZ = self.AccelOffsetZRegister(self)
     self.registers.append(self.accelOffsetZ)
     self.magnetometerOffsetX = self.MagnetometerOffsetXRegister(self)
     self.registers.append(self.magnetometerOffsetX)
     self.magnetometerOffsetY = self.MagnetometerOffsetYRegister(self)
     self.registers.append(self.magnetometerOffsetY)
     self.magnetometerOffsetZ = self.MagnetometerOffsetZRegister(self)
     self.registers.append(self.magnetometerOffsetZ)
     self.gyroOffsetX = self.GyroOffsetXRegister(self)
     self.registers.append(self.gyroOffsetX)
     self.gyroOffsetY = self.GyroOffsetYRegister(self)
     self.registers.append(self.gyroOffsetY)
     self.gyroOffsetZ = self.GyroOffsetZRegister(self)
     self.registers.append(self.gyroOffsetZ)
     self.accelRadius = self.AccelRadiusRegister(self)
     self.registers.append(self.accelRadius)
     self.magRadius = self.MagRadiusRegister(self)
     self.registers.append(self.magRadius)