### This file was auto-generated by RegisterGenerator. Any changes to it will be overwritten!
from treehopper.libraries.register_manager_adapter import RegisterManagerAdapter
from treehopper.libraries.register_manager import RegisterManager, Register, sign_extend


class OutputDataRates:
    powerDown = 0
    Hz_3_125 = 1
    Hz_6_25 = 2
    Hz_12_5 = 3
    Hz_25 = 4
    Hz_50 = 5
    Hz_100 = 6
    Hz_200 = 7
    Hz_400 = 8
    Hz_800 = 9
    Hz_1600 = 10
    
class FullScaleSelections:
    Fs_2g = 0
    Fs_4g = 1
    Fs_6g = 2
    Fs_8g = 3
    Fs_16g = 4
    
class AntiAliasFilterBandwidths:
    Hz_773 = 0
    Hz_194 = 1
    Hz_362 = 2
    Hz_50 = 3
    
class MagDataRates:
    Hz_3_125 = 0
    Hz_6_25 = 1
    Hz_12_5 = 2
    Hz_25 = 3
    Hz_50 = 4
    Hz_100 = 5
    
class MagResolutions:
    lowResolution = 0
    highResolution = 3
    
class MagFullScaleSelections:
    gauss_2 = 0
    gauss_4 = 1
    gauss_8 = 2
    gauss_12 = 3
    
class MagSensorModes:
    ContinuousConversion = 0
    SingleConversion = 1
    PowerDown = 2
    
class AccelhighPassModes:
    Reset = 0
    ReferenceSignal = 1
    Normal = 2
    AutoResetOnInterrupt = 3
    
class FifoModes:
    Bypass = 0
    Fifo = 1
    Stream = 2
    StreamToFifo = 3
    BypassToStream = 4
    
class Lsm303dRegisters(RegisterManager):
    def __init__(self, manager: RegisterManagerAdapter):
        RegisterManager.__init__(self, manager, True)
        self.tempOut = self.TempOutRegister(self)
        self.registers.append(self.tempOut)
        self.status = self.StatusRegister(self)
        self.registers.append(self.status)
        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)
        self.whoAmI = self.WhoAmIRegister(self)
        self.registers.append(self.whoAmI)
        self.intCtrl = self.IntCtrlRegister(self)
        self.registers.append(self.intCtrl)
        self.intSource = self.IntSourceRegister(self)
        self.registers.append(self.intSource)
        self.intThreshold = self.IntThresholdRegister(self)
        self.registers.append(self.intThreshold)
        self.offsetX = self.OffsetXRegister(self)
        self.registers.append(self.offsetX)
        self.offsetY = self.OffsetYRegister(self)
        self.registers.append(self.offsetY)
        self.offsetZ = self.OffsetZRegister(self)
        self.registers.append(self.offsetZ)
        self.referenceX = self.ReferenceXRegister(self)
        self.registers.append(self.referenceX)
        self.referenceY = self.ReferenceYRegister(self)
        self.registers.append(self.referenceY)
        self.referenceZ = self.ReferenceZRegister(self)
        self.registers.append(self.referenceZ)
        self.ctrl0 = self.Ctrl0Register(self)
        self.registers.append(self.ctrl0)
        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.ctrl7 = self.Ctrl7Register(self)
        self.registers.append(self.ctrl7)
        self.statusA = self.StatusARegister(self)
        self.registers.append(self.statusA)
        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)
        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.activationThreshold = self.ActivationThresholdRegister(self)
        self.registers.append(self.activationThreshold)
        self.activationDuration = self.ActivationDurationRegister(self)
        self.registers.append(self.activationDuration)

    class TempOutRegister(Register):
        def __init__(self, reg_manager: RegisterManager):
            Register.__init__(self, reg_manager, 0x05, 2, False)
            self.value = 0


        def read(self):
            self._manager.read(self)
            return self
            
        def getValue(self):
            return ((self.value & 0xFFF) << 0)

        def setValue(self, value: int):
            self.value = sign_extend((value >> 0) & 0xFFF, 12)

        def __str__(self):
            retVal = ""
            retVal += "Value: {} (offset: 0, width: 12)\r\n".format(self.value)
            return retVal

    class StatusRegister(Register):
        def __init__(self, reg_manager: RegisterManager):
            Register.__init__(self, reg_manager, 0x07, 1, False)
            self.xDataAvailable = 0
            self.yDataAvailable = 0
            self.zDataAvailable = 0
            self.zyxDataAvailable = 0
            self.xDataOverrun = 0
            self.yDataOverrun = 0
            self.zDataOverrun = 0
            self.zyxDataOverrun = 0


        def read(self):
            self._manager.read(self)
            return self
            
        def getValue(self):
            return ((self.xDataAvailable & 0x1) << 0) | ((self.yDataAvailable & 0x1) << 1) | ((self.zDataAvailable & 0x1) << 2) | ((self.zyxDataAvailable & 0x1) << 3) | ((self.xDataOverrun & 0x1) << 4) | ((self.yDataOverrun & 0x1) << 5) | ((self.zDataOverrun & 0x1) << 6) | ((self.zyxDataOverrun & 0x1) << 7)

        def setValue(self, value: int):
            self.xDataAvailable = ((value >> 0) & 0x1)
            self.yDataAvailable = ((value >> 1) & 0x1)
            self.zDataAvailable = ((value >> 2) & 0x1)
            self.zyxDataAvailable = ((value >> 3) & 0x1)
            self.xDataOverrun = ((value >> 4) & 0x1)
            self.yDataOverrun = ((value >> 5) & 0x1)
            self.zDataOverrun = ((value >> 6) & 0x1)
            self.zyxDataOverrun = ((value >> 7) & 0x1)

        def __str__(self):
            retVal = ""
            retVal += "XDataAvailable: {} (offset: 0, width: 1)\r\n".format(self.xDataAvailable)
            retVal += "YDataAvailable: {} (offset: 1, width: 1)\r\n".format(self.yDataAvailable)
            retVal += "ZDataAvailable: {} (offset: 2, width: 1)\r\n".format(self.zDataAvailable)
            retVal += "ZyxDataAvailable: {} (offset: 3, width: 1)\r\n".format(self.zyxDataAvailable)
            retVal += "XDataOverrun: {} (offset: 4, width: 1)\r\n".format(self.xDataOverrun)
            retVal += "YDataOverrun: {} (offset: 5, width: 1)\r\n".format(self.yDataOverrun)
            retVal += "ZDataOverrun: {} (offset: 6, width: 1)\r\n".format(self.zDataOverrun)
            retVal += "ZyxDataOverrun: {} (offset: 7, width: 1)\r\n".format(self.zyxDataOverrun)
            return retVal

    class OutXRegister(Register):
        def __init__(self, reg_manager: RegisterManager):
            Register.__init__(self, reg_manager, 0x08, 2, False)
            self.value = 0


        def read(self):
            self._manager.read(self)
            return self
            
        def getValue(self):
            return ((self.value & 0xFFFF) << 0)

        def setValue(self, value: int):
            self.value = ((value >> 0) & 0xFFFF)

        def __str__(self):
            retVal = ""
            retVal += "Value: {} (offset: 0, width: 16)\r\n".format(self.value)
            return retVal

    class OutYRegister(Register):
        def __init__(self, reg_manager: RegisterManager):
            Register.__init__(self, reg_manager, 0x0A, 2, False)
            self.value = 0


        def read(self):
            self._manager.read(self)
            return self
            
        def getValue(self):
            return ((self.value & 0xFFFF) << 0)

        def setValue(self, value: int):
            self.value = ((value >> 0) & 0xFFFF)

        def __str__(self):
            retVal = ""
            retVal += "Value: {} (offset: 0, width: 16)\r\n".format(self.value)
            return retVal

    class OutZRegister(Register):
        def __init__(self, reg_manager: RegisterManager):
            Register.__init__(self, reg_manager, 0x0C, 2, False)
            self.value = 0


        def read(self):
            self._manager.read(self)
            return self
            
        def getValue(self):
            return ((self.value & 0xFFFF) << 0)

        def setValue(self, value: int):
            self.value = ((value >> 0) & 0xFFFF)

        def __str__(self):
            retVal = ""
            retVal += "Value: {} (offset: 0, width: 16)\r\n".format(self.value)
            return retVal

    class WhoAmIRegister(Register):
        def __init__(self, reg_manager: RegisterManager):
            Register.__init__(self, reg_manager, 0x0f, 1, False)
            self.value = 0


        def read(self):
            self._manager.read(self)
            return self
            
        def getValue(self):
            return ((self.value & 0xFF) << 0)

        def setValue(self, value: int):
            self.value = ((value >> 0) & 0xFF)

        def __str__(self):
            retVal = ""
            retVal += "Value: {} (offset: 0, width: 8)\r\n".format(self.value)
            return retVal

    class IntCtrlRegister(Register):
        def __init__(self, reg_manager: RegisterManager):
            Register.__init__(self, reg_manager, 0x12, 1, False)
            self.magInterruptEnable = 0
            self.enable4D = 0
            self.latchInterruptRequest = 0
            self.interruptPolarity = 0
            self.interruptPinPushPull = 0
            self.zInterruptEnable = 0
            self.yInterruptEnable = 0
            self.xInterruptEnable = 0


        def read(self):
            self._manager.read(self)
            return self
            
        def getValue(self):
            return ((self.magInterruptEnable & 0x1) << 0) | ((self.enable4D & 0x1) << 1) | ((self.latchInterruptRequest & 0x1) << 2) | ((self.interruptPolarity & 0x1) << 3) | ((self.interruptPinPushPull & 0x1) << 4) | ((self.zInterruptEnable & 0x1) << 5) | ((self.yInterruptEnable & 0x1) << 6) | ((self.xInterruptEnable & 0x1) << 7)

        def setValue(self, value: int):
            self.magInterruptEnable = ((value >> 0) & 0x1)
            self.enable4D = ((value >> 1) & 0x1)
            self.latchInterruptRequest = ((value >> 2) & 0x1)
            self.interruptPolarity = ((value >> 3) & 0x1)
            self.interruptPinPushPull = ((value >> 4) & 0x1)
            self.zInterruptEnable = ((value >> 5) & 0x1)
            self.yInterruptEnable = ((value >> 6) & 0x1)
            self.xInterruptEnable = ((value >> 7) & 0x1)

        def __str__(self):
            retVal = ""
            retVal += "MagInterruptEnable: {} (offset: 0, width: 1)\r\n".format(self.magInterruptEnable)
            retVal += "Enable4D: {} (offset: 1, width: 1)\r\n".format(self.enable4D)
            retVal += "LatchInterruptRequest: {} (offset: 2, width: 1)\r\n".format(self.latchInterruptRequest)
            retVal += "InterruptPolarity: {} (offset: 3, width: 1)\r\n".format(self.interruptPolarity)
            retVal += "InterruptPinPushPull: {} (offset: 4, width: 1)\r\n".format(self.interruptPinPushPull)
            retVal += "ZInterruptEnable: {} (offset: 5, width: 1)\r\n".format(self.zInterruptEnable)
            retVal += "YInterruptEnable: {} (offset: 6, width: 1)\r\n".format(self.yInterruptEnable)
            retVal += "XInterruptEnable: {} (offset: 7, width: 1)\r\n".format(self.xInterruptEnable)
            return retVal

    class IntSourceRegister(Register):
        def __init__(self, reg_manager: RegisterManager):
            Register.__init__(self, reg_manager, 0x13, 1, False)
            self.mint = 0
            self.measurementRangeOverflow = 0
            self.negativeThresholdZ = 0
            self.negativeThresholdY = 0
            self.negativeThresholdX = 0
            self.positiveThresholdZ = 0
            self.positiveThresholdY = 0
            self.positiveThresholdX = 0


        def read(self):
            self._manager.read(self)
            return self
            
        def getValue(self):
            return ((self.mint & 0x1) << 0) | ((self.measurementRangeOverflow & 0x1) << 1) | ((self.negativeThresholdZ & 0x1) << 2) | ((self.negativeThresholdY & 0x1) << 3) | ((self.negativeThresholdX & 0x1) << 4) | ((self.positiveThresholdZ & 0x1) << 5) | ((self.positiveThresholdY & 0x1) << 6) | ((self.positiveThresholdX & 0x1) << 7)

        def setValue(self, value: int):
            self.mint = ((value >> 0) & 0x1)
            self.measurementRangeOverflow = ((value >> 1) & 0x1)
            self.negativeThresholdZ = ((value >> 2) & 0x1)
            self.negativeThresholdY = ((value >> 3) & 0x1)
            self.negativeThresholdX = ((value >> 4) & 0x1)
            self.positiveThresholdZ = ((value >> 5) & 0x1)
            self.positiveThresholdY = ((value >> 6) & 0x1)
            self.positiveThresholdX = ((value >> 7) & 0x1)

        def __str__(self):
            retVal = ""
            retVal += "Mint: {} (offset: 0, width: 1)\r\n".format(self.mint)
            retVal += "MeasurementRangeOverflow: {} (offset: 1, width: 1)\r\n".format(self.measurementRangeOverflow)
            retVal += "NegativeThresholdZ: {} (offset: 2, width: 1)\r\n".format(self.negativeThresholdZ)
            retVal += "NegativeThresholdY: {} (offset: 3, width: 1)\r\n".format(self.negativeThresholdY)
            retVal += "NegativeThresholdX: {} (offset: 4, width: 1)\r\n".format(self.negativeThresholdX)
            retVal += "PositiveThresholdZ: {} (offset: 5, width: 1)\r\n".format(self.positiveThresholdZ)
            retVal += "PositiveThresholdY: {} (offset: 6, width: 1)\r\n".format(self.positiveThresholdY)
            retVal += "PositiveThresholdX: {} (offset: 7, width: 1)\r\n".format(self.positiveThresholdX)
            return retVal

    class IntThresholdRegister(Register):
        def __init__(self, reg_manager: RegisterManager):
            Register.__init__(self, reg_manager, 0x14, 2, False)
            self.value = 0


        def read(self):
            self._manager.read(self)
            return self
            
        def getValue(self):
            return ((self.value & 0xFFFF) << 0)

        def setValue(self, value: int):
            self.value = sign_extend((value >> 0) & 0xFFFF, 16)

        def __str__(self):
            retVal = ""
            retVal += "Value: {} (offset: 0, width: 16)\r\n".format(self.value)
            return retVal

    class OffsetXRegister(Register):
        def __init__(self, reg_manager: RegisterManager):
            Register.__init__(self, reg_manager, 0x16, 2, False)
            self.value = 0


        def read(self):
            self._manager.read(self)
            return self
            
        def getValue(self):
            return ((self.value & 0xFFFF) << 0)

        def setValue(self, value: int):
            self.value = sign_extend((value >> 0) & 0xFFFF, 16)

        def __str__(self):
            retVal = ""
            retVal += "Value: {} (offset: 0, width: 16)\r\n".format(self.value)
            return retVal

    class OffsetYRegister(Register):
        def __init__(self, reg_manager: RegisterManager):
            Register.__init__(self, reg_manager, 0x18, 2, False)
            self.value = 0


        def read(self):
            self._manager.read(self)
            return self
            
        def getValue(self):
            return ((self.value & 0xFFFF) << 0)

        def setValue(self, value: int):
            self.value = sign_extend((value >> 0) & 0xFFFF, 16)

        def __str__(self):
            retVal = ""
            retVal += "Value: {} (offset: 0, width: 16)\r\n".format(self.value)
            return retVal

    class OffsetZRegister(Register):
        def __init__(self, reg_manager: RegisterManager):
            Register.__init__(self, reg_manager, 0x1A, 2, False)
            self.value = 0


        def read(self):
            self._manager.read(self)
            return self
            
        def getValue(self):
            return ((self.value & 0xFFFF) << 0)

        def setValue(self, value: int):
            self.value = sign_extend((value >> 0) & 0xFFFF, 16)

        def __str__(self):
            retVal = ""
            retVal += "Value: {} (offset: 0, width: 16)\r\n".format(self.value)
            return retVal

    class ReferenceXRegister(Register):
        def __init__(self, reg_manager: RegisterManager):
            Register.__init__(self, reg_manager, 0x1c, 1, False)
            self.value = 0


        def read(self):
            self._manager.read(self)
            return self
            
        def getValue(self):
            return ((self.value & 0xFF) << 0)

        def setValue(self, value: int):
            self.value = ((value >> 0) & 0xFF)

        def __str__(self):
            retVal = ""
            retVal += "Value: {} (offset: 0, width: 8)\r\n".format(self.value)
            return retVal

    class ReferenceYRegister(Register):
        def __init__(self, reg_manager: RegisterManager):
            Register.__init__(self, reg_manager, 0x1d, 1, False)
            self.value = 0


        def read(self):
            self._manager.read(self)
            return self
            
        def getValue(self):
            return ((self.value & 0xFF) << 0)

        def setValue(self, value: int):
            self.value = ((value >> 0) & 0xFF)

        def __str__(self):
            retVal = ""
            retVal += "Value: {} (offset: 0, width: 8)\r\n".format(self.value)
            return retVal

    class ReferenceZRegister(Register):
        def __init__(self, reg_manager: RegisterManager):
            Register.__init__(self, reg_manager, 0x1E, 1, False)
            self.value = 0


        def read(self):
            self._manager.read(self)
            return self
            
        def getValue(self):
            return ((self.value & 0xFF) << 0)

        def setValue(self, value: int):
            self.value = ((value >> 0) & 0xFF)

        def __str__(self):
            retVal = ""
            retVal += "Value: {} (offset: 0, width: 8)\r\n".format(self.value)
            return retVal

    class Ctrl0Register(Register):
        def __init__(self, reg_manager: RegisterManager):
            Register.__init__(self, reg_manager, 0x1f, 1, False)
            self.hpis2 = 0
            self.hpis1 = 0
            self.hpClick = 0
            self.fifoThresholdEnable = 0
            self.fifoEnable = 0
            self.boot = 0


        def read(self):
            self._manager.read(self)
            return self
            
        def getValue(self):
            return ((self.hpis2 & 0x1) << 0) | ((self.hpis1 & 0x1) << 1) | ((self.hpClick & 0x1) << 2) | ((self.fifoThresholdEnable & 0x1) << 5) | ((self.fifoEnable & 0x1) << 6) | ((self.boot & 0x1) << 7)

        def setValue(self, value: int):
            self.hpis2 = ((value >> 0) & 0x1)
            self.hpis1 = ((value >> 1) & 0x1)
            self.hpClick = ((value >> 2) & 0x1)
            self.fifoThresholdEnable = ((value >> 5) & 0x1)
            self.fifoEnable = ((value >> 6) & 0x1)
            self.boot = ((value >> 7) & 0x1)

        def __str__(self):
            retVal = ""
            retVal += "Hpis2: {} (offset: 0, width: 1)\r\n".format(self.hpis2)
            retVal += "Hpis1: {} (offset: 1, width: 1)\r\n".format(self.hpis1)
            retVal += "HpClick: {} (offset: 2, width: 1)\r\n".format(self.hpClick)
            retVal += "FifoThresholdEnable: {} (offset: 5, width: 1)\r\n".format(self.fifoThresholdEnable)
            retVal += "FifoEnable: {} (offset: 6, width: 1)\r\n".format(self.fifoEnable)
            retVal += "Boot: {} (offset: 7, width: 1)\r\n".format(self.boot)
            return retVal

    class Ctrl1Register(Register):
        def __init__(self, reg_manager: RegisterManager):
            Register.__init__(self, reg_manager, 0x20, 1, False)
            self.xEnable = 0
            self.yEnable = 0
            self.zEnable = 0
            self.blockDataUpdate = 0
            self.outputDataRate = 0


        def read(self):
            self._manager.read(self)
            return self
            
        def getValue(self):
            return ((self.xEnable & 0x1) << 0) | ((self.yEnable & 0x1) << 1) | ((self.zEnable & 0x1) << 2) | ((self.blockDataUpdate & 0x1) << 3) | ((self.outputDataRate & 0xF) << 4)

        def setValue(self, value: int):
            self.xEnable = ((value >> 0) & 0x1)
            self.yEnable = ((value >> 1) & 0x1)
            self.zEnable = ((value >> 2) & 0x1)
            self.blockDataUpdate = ((value >> 3) & 0x1)
            self.outputDataRate = ((value >> 4) & 0xF)

        def __str__(self):
            retVal = ""
            retVal += "XEnable: {} (offset: 0, width: 1)\r\n".format(self.xEnable)
            retVal += "YEnable: {} (offset: 1, width: 1)\r\n".format(self.yEnable)
            retVal += "ZEnable: {} (offset: 2, width: 1)\r\n".format(self.zEnable)
            retVal += "BlockDataUpdate: {} (offset: 3, width: 1)\r\n".format(self.blockDataUpdate)
            retVal += "OutputDataRate: {} (offset: 4, width: 4)\r\n".format(self.outputDataRate)
            return retVal

    class Ctrl2Register(Register):
        def __init__(self, reg_manager: RegisterManager):
            Register.__init__(self, reg_manager, 0x21, 1, False)
            self.spiModeSelection = 0
            self.accelerationSelfTest = 0
            self.fullScaleSelection = 0
            self.antiAliasFilterBandwidth = 0


        def read(self):
            self._manager.read(self)
            return self
            
        def getValue(self):
            return ((self.spiModeSelection & 0x1) << 0) | ((self.accelerationSelfTest & 0x1) << 1) | ((self.fullScaleSelection & 0x7) << 3) | ((self.antiAliasFilterBandwidth & 0x3) << 6)

        def setValue(self, value: int):
            self.spiModeSelection = ((value >> 0) & 0x1)
            self.accelerationSelfTest = ((value >> 1) & 0x1)
            self.fullScaleSelection = ((value >> 3) & 0x7)
            self.antiAliasFilterBandwidth = ((value >> 6) & 0x3)

        def __str__(self):
            retVal = ""
            retVal += "SpiModeSelection: {} (offset: 0, width: 1)\r\n".format(self.spiModeSelection)
            retVal += "AccelerationSelfTest: {} (offset: 1, width: 1)\r\n".format(self.accelerationSelfTest)
            retVal += "FullScaleSelection: {} (offset: 3, width: 3)\r\n".format(self.fullScaleSelection)
            retVal += "AntiAliasFilterBandwidth: {} (offset: 6, width: 2)\r\n".format(self.antiAliasFilterBandwidth)
            return retVal

    class Ctrl3Register(Register):
        def __init__(self, reg_manager: RegisterManager):
            Register.__init__(self, reg_manager, 0x22, 1, False)
            self.fifoEmptyOnInt1 = 0
            self.magReadyOnInt1 = 0
            self.accelReadyOnInt1 = 0
            self.magGenOnInt1 = 0
            self.inertialGen2OnInt1 = 0
            self.inertialGen1OnInt1 = 0
            self.clickGenOnInt1 = 0
            self.bootOnInt1 = 0


        def read(self):
            self._manager.read(self)
            return self
            
        def getValue(self):
            return ((self.fifoEmptyOnInt1 & 0x1) << 0) | ((self.magReadyOnInt1 & 0x1) << 1) | ((self.accelReadyOnInt1 & 0x1) << 2) | ((self.magGenOnInt1 & 0x1) << 3) | ((self.inertialGen2OnInt1 & 0x1) << 4) | ((self.inertialGen1OnInt1 & 0x1) << 5) | ((self.clickGenOnInt1 & 0x1) << 6) | ((self.bootOnInt1 & 0x1) << 7)

        def setValue(self, value: int):
            self.fifoEmptyOnInt1 = ((value >> 0) & 0x1)
            self.magReadyOnInt1 = ((value >> 1) & 0x1)
            self.accelReadyOnInt1 = ((value >> 2) & 0x1)
            self.magGenOnInt1 = ((value >> 3) & 0x1)
            self.inertialGen2OnInt1 = ((value >> 4) & 0x1)
            self.inertialGen1OnInt1 = ((value >> 5) & 0x1)
            self.clickGenOnInt1 = ((value >> 6) & 0x1)
            self.bootOnInt1 = ((value >> 7) & 0x1)

        def __str__(self):
            retVal = ""
            retVal += "FifoEmptyOnInt1: {} (offset: 0, width: 1)\r\n".format(self.fifoEmptyOnInt1)
            retVal += "MagReadyOnInt1: {} (offset: 1, width: 1)\r\n".format(self.magReadyOnInt1)
            retVal += "AccelReadyOnInt1: {} (offset: 2, width: 1)\r\n".format(self.accelReadyOnInt1)
            retVal += "MagGenOnInt1: {} (offset: 3, width: 1)\r\n".format(self.magGenOnInt1)
            retVal += "InertialGen2OnInt1: {} (offset: 4, width: 1)\r\n".format(self.inertialGen2OnInt1)
            retVal += "InertialGen1OnInt1: {} (offset: 5, width: 1)\r\n".format(self.inertialGen1OnInt1)
            retVal += "ClickGenOnInt1: {} (offset: 6, width: 1)\r\n".format(self.clickGenOnInt1)
            retVal += "BootOnInt1: {} (offset: 7, width: 1)\r\n".format(self.bootOnInt1)
            return retVal

    class Ctrl4Register(Register):
        def __init__(self, reg_manager: RegisterManager):
            Register.__init__(self, reg_manager, 0x23, 1, False)
            self.fifoThresholdOnInt2 = 0
            self.fifoOverrunOnInt2 = 0
            self.magDataReadyOnInt2 = 0
            self.accelDataReadyOnInt2 = 0
            self.magIntOnInt2 = 0
            self.inertialGen2OnInt2 = 0
            self.inertialGen1OnInt2 = 0
            self.clickGenOnInt2 = 0


        def read(self):
            self._manager.read(self)
            return self
            
        def getValue(self):
            return ((self.fifoThresholdOnInt2 & 0x1) << 0) | ((self.fifoOverrunOnInt2 & 0x1) << 1) | ((self.magDataReadyOnInt2 & 0x1) << 2) | ((self.accelDataReadyOnInt2 & 0x1) << 3) | ((self.magIntOnInt2 & 0x1) << 4) | ((self.inertialGen2OnInt2 & 0x1) << 5) | ((self.inertialGen1OnInt2 & 0x1) << 6) | ((self.clickGenOnInt2 & 0x1) << 7)

        def setValue(self, value: int):
            self.fifoThresholdOnInt2 = ((value >> 0) & 0x1)
            self.fifoOverrunOnInt2 = ((value >> 1) & 0x1)
            self.magDataReadyOnInt2 = ((value >> 2) & 0x1)
            self.accelDataReadyOnInt2 = ((value >> 3) & 0x1)
            self.magIntOnInt2 = ((value >> 4) & 0x1)
            self.inertialGen2OnInt2 = ((value >> 5) & 0x1)
            self.inertialGen1OnInt2 = ((value >> 6) & 0x1)
            self.clickGenOnInt2 = ((value >> 7) & 0x1)

        def __str__(self):
            retVal = ""
            retVal += "FifoThresholdOnInt2: {} (offset: 0, width: 1)\r\n".format(self.fifoThresholdOnInt2)
            retVal += "FifoOverrunOnInt2: {} (offset: 1, width: 1)\r\n".format(self.fifoOverrunOnInt2)
            retVal += "MagDataReadyOnInt2: {} (offset: 2, width: 1)\r\n".format(self.magDataReadyOnInt2)
            retVal += "AccelDataReadyOnInt2: {} (offset: 3, width: 1)\r\n".format(self.accelDataReadyOnInt2)
            retVal += "MagIntOnInt2: {} (offset: 4, width: 1)\r\n".format(self.magIntOnInt2)
            retVal += "InertialGen2OnInt2: {} (offset: 5, width: 1)\r\n".format(self.inertialGen2OnInt2)
            retVal += "InertialGen1OnInt2: {} (offset: 6, width: 1)\r\n".format(self.inertialGen1OnInt2)
            retVal += "ClickGenOnInt2: {} (offset: 7, width: 1)\r\n".format(self.clickGenOnInt2)
            return retVal

    class Ctrl5Register(Register):
        def __init__(self, reg_manager: RegisterManager):
            Register.__init__(self, reg_manager, 0x24, 1, False)
            self.latchIntOnInt1 = 0
            self.latchIntOnInt2 = 0
            self.magDataRate = 0
            self.magResolution = 0
            self.tempEnable = 0


        def read(self):
            self._manager.read(self)
            return self
            
        def getValue(self):
            return ((self.latchIntOnInt1 & 0x1) << 0) | ((self.latchIntOnInt2 & 0x1) << 1) | ((self.magDataRate & 0x7) << 2) | ((self.magResolution & 0x3) << 5) | ((self.tempEnable & 0x1) << 7)

        def setValue(self, value: int):
            self.latchIntOnInt1 = ((value >> 0) & 0x1)
            self.latchIntOnInt2 = ((value >> 1) & 0x1)
            self.magDataRate = ((value >> 2) & 0x7)
            self.magResolution = ((value >> 5) & 0x3)
            self.tempEnable = ((value >> 7) & 0x1)

        def __str__(self):
            retVal = ""
            retVal += "LatchIntOnInt1: {} (offset: 0, width: 1)\r\n".format(self.latchIntOnInt1)
            retVal += "LatchIntOnInt2: {} (offset: 1, width: 1)\r\n".format(self.latchIntOnInt2)
            retVal += "MagDataRate: {} (offset: 2, width: 3)\r\n".format(self.magDataRate)
            retVal += "MagResolution: {} (offset: 5, width: 2)\r\n".format(self.magResolution)
            retVal += "TempEnable: {} (offset: 7, width: 1)\r\n".format(self.tempEnable)
            return retVal

    class Ctrl6Register(Register):
        def __init__(self, reg_manager: RegisterManager):
            Register.__init__(self, reg_manager, 0x25, 1, False)
            self.magFullScaleSelection = 0


        def read(self):
            self._manager.read(self)
            return self
            
        def getValue(self):
            return ((self.magFullScaleSelection & 0x3) << 5)

        def setValue(self, value: int):
            self.magFullScaleSelection = ((value >> 5) & 0x3)

        def __str__(self):
            retVal = ""
            retVal += "MagFullScaleSelection: {} (offset: 5, width: 2)\r\n".format(self.magFullScaleSelection)
            return retVal

    class Ctrl7Register(Register):
        def __init__(self, reg_manager: RegisterManager):
            Register.__init__(self, reg_manager, 0x26, 1, False)
            self.magSensorMode = 0
            self.magLowPowerMode = 0
            self.tempOnly = 0
            self.filteredAccelData = 0
            self.accelhighPassMode = 0


        def read(self):
            self._manager.read(self)
            return self
            
        def getValue(self):
            return ((self.magSensorMode & 0x3) << 0) | ((self.magLowPowerMode & 0x1) << 2) | ((self.tempOnly & 0x1) << 4) | ((self.filteredAccelData & 0x1) << 5) | ((self.accelhighPassMode & 0x3) << 6)

        def setValue(self, value: int):
            self.magSensorMode = ((value >> 0) & 0x3)
            self.magLowPowerMode = ((value >> 2) & 0x1)
            self.tempOnly = ((value >> 4) & 0x1)
            self.filteredAccelData = ((value >> 5) & 0x1)
            self.accelhighPassMode = ((value >> 6) & 0x3)

        def __str__(self):
            retVal = ""
            retVal += "MagSensorMode: {} (offset: 0, width: 2)\r\n".format(self.magSensorMode)
            retVal += "MagLowPowerMode: {} (offset: 2, width: 1)\r\n".format(self.magLowPowerMode)
            retVal += "TempOnly: {} (offset: 4, width: 1)\r\n".format(self.tempOnly)
            retVal += "FilteredAccelData: {} (offset: 5, width: 1)\r\n".format(self.filteredAccelData)
            retVal += "AccelhighPassMode: {} (offset: 6, width: 2)\r\n".format(self.accelhighPassMode)
            return retVal

    class StatusARegister(Register):
        def __init__(self, reg_manager: RegisterManager):
            Register.__init__(self, reg_manager, 0x27, 1, False)
            self.accelXAvailable = 0
            self.accelYAvailable = 0
            self.accelZAvailable = 0
            self.accelXYZAvailable = 0
            self.accelXOverrun = 0
            self.accelYOverrun = 0
            self.accelZOverrun = 0
            self.accelXYZOverrun = 0


        def read(self):
            self._manager.read(self)
            return self
            
        def getValue(self):
            return ((self.accelXAvailable & 0x1) << 0) | ((self.accelYAvailable & 0x1) << 1) | ((self.accelZAvailable & 0x1) << 2) | ((self.accelXYZAvailable & 0x1) << 3) | ((self.accelXOverrun & 0x1) << 4) | ((self.accelYOverrun & 0x1) << 5) | ((self.accelZOverrun & 0x1) << 6) | ((self.accelXYZOverrun & 0x1) << 7)

        def setValue(self, value: int):
            self.accelXAvailable = ((value >> 0) & 0x1)
            self.accelYAvailable = ((value >> 1) & 0x1)
            self.accelZAvailable = ((value >> 2) & 0x1)
            self.accelXYZAvailable = ((value >> 3) & 0x1)
            self.accelXOverrun = ((value >> 4) & 0x1)
            self.accelYOverrun = ((value >> 5) & 0x1)
            self.accelZOverrun = ((value >> 6) & 0x1)
            self.accelXYZOverrun = ((value >> 7) & 0x1)

        def __str__(self):
            retVal = ""
            retVal += "AccelXAvailable: {} (offset: 0, width: 1)\r\n".format(self.accelXAvailable)
            retVal += "AccelYAvailable: {} (offset: 1, width: 1)\r\n".format(self.accelYAvailable)
            retVal += "AccelZAvailable: {} (offset: 2, width: 1)\r\n".format(self.accelZAvailable)
            retVal += "AccelXYZAvailable: {} (offset: 3, width: 1)\r\n".format(self.accelXYZAvailable)
            retVal += "AccelXOverrun: {} (offset: 4, width: 1)\r\n".format(self.accelXOverrun)
            retVal += "AccelYOverrun: {} (offset: 5, width: 1)\r\n".format(self.accelYOverrun)
            retVal += "AccelZOverrun: {} (offset: 6, width: 1)\r\n".format(self.accelZOverrun)
            retVal += "AccelXYZOverrun: {} (offset: 7, width: 1)\r\n".format(self.accelXYZOverrun)
            return retVal

    class OutAccelXRegister(Register):
        def __init__(self, reg_manager: RegisterManager):
            Register.__init__(self, reg_manager, 0x28, 2, False)
            self.value = 0


        def read(self):
            self._manager.read(self)
            return self
            
        def getValue(self):
            return ((self.value & 0xFFFF) << 0)

        def setValue(self, value: int):
            self.value = sign_extend((value >> 0) & 0xFFFF, 16)

        def __str__(self):
            retVal = ""
            retVal += "Value: {} (offset: 0, width: 16)\r\n".format(self.value)
            return retVal

    class OutAccelYRegister(Register):
        def __init__(self, reg_manager: RegisterManager):
            Register.__init__(self, reg_manager, 0x2A, 2, False)
            self.value = 0


        def read(self):
            self._manager.read(self)
            return self
            
        def getValue(self):
            return ((self.value & 0xFFFF) << 0)

        def setValue(self, value: int):
            self.value = sign_extend((value >> 0) & 0xFFFF, 16)

        def __str__(self):
            retVal = ""
            retVal += "Value: {} (offset: 0, width: 16)\r\n".format(self.value)
            return retVal

    class OutAccelZRegister(Register):
        def __init__(self, reg_manager: RegisterManager):
            Register.__init__(self, reg_manager, 0x2C, 2, False)
            self.value = 0


        def read(self):
            self._manager.read(self)
            return self
            
        def getValue(self):
            return ((self.value & 0xFFFF) << 0)

        def setValue(self, value: int):
            self.value = sign_extend((value >> 0) & 0xFFFF, 16)

        def __str__(self):
            retVal = ""
            retVal += "Value: {} (offset: 0, width: 16)\r\n".format(self.value)
            return retVal

    class FifoControlRegister(Register):
        def __init__(self, reg_manager: RegisterManager):
            Register.__init__(self, reg_manager, 0x2E, 1, False)
            self.fifoThreshold = 0
            self.fifoMode = 0


        def read(self):
            self._manager.read(self)
            return self
            
        def getValue(self):
            return ((self.fifoThreshold & 0x1F) << 0) | ((self.fifoMode & 0x7) << 5)

        def setValue(self, value: int):
            self.fifoThreshold = ((value >> 0) & 0x1F)
            self.fifoMode = ((value >> 5) & 0x7)

        def __str__(self):
            retVal = ""
            retVal += "FifoThreshold: {} (offset: 0, width: 5)\r\n".format(self.fifoThreshold)
            retVal += "FifoMode: {} (offset: 5, width: 3)\r\n".format(self.fifoMode)
            return retVal

    class FifoSourceRegister(Register):
        def __init__(self, reg_manager: RegisterManager):
            Register.__init__(self, reg_manager, 0x2f, 1, False)
            self.fifoStoredLevel = 0
            self.empty = 0
            self.overrun = 0
            self.fifoThreshold = 0


        def read(self):
            self._manager.read(self)
            return self
            
        def getValue(self):
            return ((self.fifoStoredLevel & 0x1F) << 0) | ((self.empty & 0x1) << 5) | ((self.overrun & 0x1) << 6) | ((self.fifoThreshold & 0x1) << 7)

        def setValue(self, value: int):
            self.fifoStoredLevel = ((value >> 0) & 0x1F)
            self.empty = ((value >> 5) & 0x1)
            self.overrun = ((value >> 6) & 0x1)
            self.fifoThreshold = ((value >> 7) & 0x1)

        def __str__(self):
            retVal = ""
            retVal += "FifoStoredLevel: {} (offset: 0, width: 5)\r\n".format(self.fifoStoredLevel)
            retVal += "Empty: {} (offset: 5, width: 1)\r\n".format(self.empty)
            retVal += "Overrun: {} (offset: 6, width: 1)\r\n".format(self.overrun)
            retVal += "FifoThreshold: {} (offset: 7, width: 1)\r\n".format(self.fifoThreshold)
            return retVal

    class InertialIntGen1ConfigRegister(Register):
        def __init__(self, reg_manager: RegisterManager):
            Register.__init__(self, reg_manager, 0x30, 1, False)
            self.xLowInterruptEnable = 0
            self.xHighInterruptEnable = 0
            self.yLowInterruptEnable = 0
            self.yHighInterruptEnable = 0
            self.zLowInterruptEvent = 0
            self.zHighInterruptEnable = 0
            self.detect6D = 0
            self.andOrInterruptEvents = 0


        def read(self):
            self._manager.read(self)
            return self
            
        def getValue(self):
            return ((self.xLowInterruptEnable & 0x1) << 0) | ((self.xHighInterruptEnable & 0x1) << 1) | ((self.yLowInterruptEnable & 0x1) << 2) | ((self.yHighInterruptEnable & 0x1) << 3) | ((self.zLowInterruptEvent & 0x1) << 4) | ((self.zHighInterruptEnable & 0x1) << 5) | ((self.detect6D & 0x1) << 6) | ((self.andOrInterruptEvents & 0x1) << 7)

        def setValue(self, value: int):
            self.xLowInterruptEnable = ((value >> 0) & 0x1)
            self.xHighInterruptEnable = ((value >> 1) & 0x1)
            self.yLowInterruptEnable = ((value >> 2) & 0x1)
            self.yHighInterruptEnable = ((value >> 3) & 0x1)
            self.zLowInterruptEvent = ((value >> 4) & 0x1)
            self.zHighInterruptEnable = ((value >> 5) & 0x1)
            self.detect6D = ((value >> 6) & 0x1)
            self.andOrInterruptEvents = ((value >> 7) & 0x1)

        def __str__(self):
            retVal = ""
            retVal += "XLowInterruptEnable: {} (offset: 0, width: 1)\r\n".format(self.xLowInterruptEnable)
            retVal += "XHighInterruptEnable: {} (offset: 1, width: 1)\r\n".format(self.xHighInterruptEnable)
            retVal += "YLowInterruptEnable: {} (offset: 2, width: 1)\r\n".format(self.yLowInterruptEnable)
            retVal += "YHighInterruptEnable: {} (offset: 3, width: 1)\r\n".format(self.yHighInterruptEnable)
            retVal += "ZLowInterruptEvent: {} (offset: 4, width: 1)\r\n".format(self.zLowInterruptEvent)
            retVal += "ZHighInterruptEnable: {} (offset: 5, width: 1)\r\n".format(self.zHighInterruptEnable)
            retVal += "Detect6D: {} (offset: 6, width: 1)\r\n".format(self.detect6D)
            retVal += "AndOrInterruptEvents: {} (offset: 7, width: 1)\r\n".format(self.andOrInterruptEvents)
            return retVal

    class InertialIntGen1StatusRegister(Register):
        def __init__(self, reg_manager: RegisterManager):
            Register.__init__(self, reg_manager, 0x31, 1, False)
            self.xLow = 0
            self.xHigh = 0
            self.yLow = 0
            self.yHigh = 0
            self.zLow = 0
            self.zHigh = 0
            self.intStatus = 0


        def read(self):
            self._manager.read(self)
            return self
            
        def getValue(self):
            return ((self.xLow & 0x1) << 0) | ((self.xHigh & 0x1) << 1) | ((self.yLow & 0x1) << 2) | ((self.yHigh & 0x1) << 3) | ((self.zLow & 0x1) << 4) | ((self.zHigh & 0x1) << 5) | ((self.intStatus & 0x1) << 6)

        def setValue(self, value: int):
            self.xLow = ((value >> 0) & 0x1)
            self.xHigh = ((value >> 1) & 0x1)
            self.yLow = ((value >> 2) & 0x1)
            self.yHigh = ((value >> 3) & 0x1)
            self.zLow = ((value >> 4) & 0x1)
            self.zHigh = ((value >> 5) & 0x1)
            self.intStatus = ((value >> 6) & 0x1)

        def __str__(self):
            retVal = ""
            retVal += "XLow: {} (offset: 0, width: 1)\r\n".format(self.xLow)
            retVal += "XHigh: {} (offset: 1, width: 1)\r\n".format(self.xHigh)
            retVal += "YLow: {} (offset: 2, width: 1)\r\n".format(self.yLow)
            retVal += "YHigh: {} (offset: 3, width: 1)\r\n".format(self.yHigh)
            retVal += "ZLow: {} (offset: 4, width: 1)\r\n".format(self.zLow)
            retVal += "ZHigh: {} (offset: 5, width: 1)\r\n".format(self.zHigh)
            retVal += "IntStatus: {} (offset: 6, width: 1)\r\n".format(self.intStatus)
            return retVal

    class InertialIntGen1ThresholdRegister(Register):
        def __init__(self, reg_manager: RegisterManager):
            Register.__init__(self, reg_manager, 0x32, 1, False)
            self.value = 0


        def read(self):
            self._manager.read(self)
            return self
            
        def getValue(self):
            return ((self.value & 0x7F) << 0)

        def setValue(self, value: int):
            self.value = ((value >> 0) & 0x7F)

        def __str__(self):
            retVal = ""
            retVal += "Value: {} (offset: 0, width: 7)\r\n".format(self.value)
            return retVal

    class InertialIntGen1DurationRegister(Register):
        def __init__(self, reg_manager: RegisterManager):
            Register.__init__(self, reg_manager, 0x33, 1, False)
            self.value = 0


        def read(self):
            self._manager.read(self)
            return self
            
        def getValue(self):
            return ((self.value & 0x7F) << 0)

        def setValue(self, value: int):
            self.value = ((value >> 0) & 0x7F)

        def __str__(self):
            retVal = ""
            retVal += "Value: {} (offset: 0, width: 7)\r\n".format(self.value)
            return retVal

    class InertialIntGen2ConfigRegister(Register):
        def __init__(self, reg_manager: RegisterManager):
            Register.__init__(self, reg_manager, 0x34, 1, False)
            self.xLowInterruptEnable = 0
            self.xHighInterruptEnable = 0
            self.yLowInterruptEnable = 0
            self.yHighInterruptEnable = 0
            self.zLowInterruptEvent = 0
            self.zHighInterruptEnable = 0
            self.detect6D = 0
            self.andOrInterruptEvents = 0


        def read(self):
            self._manager.read(self)
            return self
            
        def getValue(self):
            return ((self.xLowInterruptEnable & 0x1) << 0) | ((self.xHighInterruptEnable & 0x1) << 1) | ((self.yLowInterruptEnable & 0x1) << 2) | ((self.yHighInterruptEnable & 0x1) << 3) | ((self.zLowInterruptEvent & 0x1) << 4) | ((self.zHighInterruptEnable & 0x1) << 5) | ((self.detect6D & 0x1) << 6) | ((self.andOrInterruptEvents & 0x1) << 7)

        def setValue(self, value: int):
            self.xLowInterruptEnable = ((value >> 0) & 0x1)
            self.xHighInterruptEnable = ((value >> 1) & 0x1)
            self.yLowInterruptEnable = ((value >> 2) & 0x1)
            self.yHighInterruptEnable = ((value >> 3) & 0x1)
            self.zLowInterruptEvent = ((value >> 4) & 0x1)
            self.zHighInterruptEnable = ((value >> 5) & 0x1)
            self.detect6D = ((value >> 6) & 0x1)
            self.andOrInterruptEvents = ((value >> 7) & 0x1)

        def __str__(self):
            retVal = ""
            retVal += "XLowInterruptEnable: {} (offset: 0, width: 1)\r\n".format(self.xLowInterruptEnable)
            retVal += "XHighInterruptEnable: {} (offset: 1, width: 1)\r\n".format(self.xHighInterruptEnable)
            retVal += "YLowInterruptEnable: {} (offset: 2, width: 1)\r\n".format(self.yLowInterruptEnable)
            retVal += "YHighInterruptEnable: {} (offset: 3, width: 1)\r\n".format(self.yHighInterruptEnable)
            retVal += "ZLowInterruptEvent: {} (offset: 4, width: 1)\r\n".format(self.zLowInterruptEvent)
            retVal += "ZHighInterruptEnable: {} (offset: 5, width: 1)\r\n".format(self.zHighInterruptEnable)
            retVal += "Detect6D: {} (offset: 6, width: 1)\r\n".format(self.detect6D)
            retVal += "AndOrInterruptEvents: {} (offset: 7, width: 1)\r\n".format(self.andOrInterruptEvents)
            return retVal

    class InertialIntGen2StatusRegister(Register):
        def __init__(self, reg_manager: RegisterManager):
            Register.__init__(self, reg_manager, 0x35, 1, False)
            self.xLow = 0
            self.xHigh = 0
            self.yLow = 0
            self.yHigh = 0
            self.zLow = 0
            self.zHigh = 0
            self.intStatus = 0


        def read(self):
            self._manager.read(self)
            return self
            
        def getValue(self):
            return ((self.xLow & 0x1) << 0) | ((self.xHigh & 0x1) << 1) | ((self.yLow & 0x1) << 2) | ((self.yHigh & 0x1) << 3) | ((self.zLow & 0x1) << 4) | ((self.zHigh & 0x1) << 5) | ((self.intStatus & 0x1) << 6)

        def setValue(self, value: int):
            self.xLow = ((value >> 0) & 0x1)
            self.xHigh = ((value >> 1) & 0x1)
            self.yLow = ((value >> 2) & 0x1)
            self.yHigh = ((value >> 3) & 0x1)
            self.zLow = ((value >> 4) & 0x1)
            self.zHigh = ((value >> 5) & 0x1)
            self.intStatus = ((value >> 6) & 0x1)

        def __str__(self):
            retVal = ""
            retVal += "XLow: {} (offset: 0, width: 1)\r\n".format(self.xLow)
            retVal += "XHigh: {} (offset: 1, width: 1)\r\n".format(self.xHigh)
            retVal += "YLow: {} (offset: 2, width: 1)\r\n".format(self.yLow)
            retVal += "YHigh: {} (offset: 3, width: 1)\r\n".format(self.yHigh)
            retVal += "ZLow: {} (offset: 4, width: 1)\r\n".format(self.zLow)
            retVal += "ZHigh: {} (offset: 5, width: 1)\r\n".format(self.zHigh)
            retVal += "IntStatus: {} (offset: 6, width: 1)\r\n".format(self.intStatus)
            return retVal

    class InertialIntGen2ThresholdRegister(Register):
        def __init__(self, reg_manager: RegisterManager):
            Register.__init__(self, reg_manager, 0x36, 1, False)
            self.value = 0


        def read(self):
            self._manager.read(self)
            return self
            
        def getValue(self):
            return ((self.value & 0x7F) << 0)

        def setValue(self, value: int):
            self.value = ((value >> 0) & 0x7F)

        def __str__(self):
            retVal = ""
            retVal += "Value: {} (offset: 0, width: 7)\r\n".format(self.value)
            return retVal

    class InertialIntGen2DurationRegister(Register):
        def __init__(self, reg_manager: RegisterManager):
            Register.__init__(self, reg_manager, 0x37, 1, False)
            self.value = 0


        def read(self):
            self._manager.read(self)
            return self
            
        def getValue(self):
            return ((self.value & 0x7F) << 0)

        def setValue(self, value: int):
            self.value = ((value >> 0) & 0x7F)

        def __str__(self):
            retVal = ""
            retVal += "Value: {} (offset: 0, width: 7)\r\n".format(self.value)
            return retVal

    class ClickConfigRegister(Register):
        def __init__(self, reg_manager: RegisterManager):
            Register.__init__(self, reg_manager, 0x38, 1, False)
            self.xSingleClick = 0
            self.xDoubleClick = 0
            self.ySingleClick = 0
            self.yDoubleClick = 0
            self.zSingleClick = 0
            self.zDoubleClick = 0


        def read(self):
            self._manager.read(self)
            return self
            
        def getValue(self):
            return ((self.xSingleClick & 0x1) << 0) | ((self.xDoubleClick & 0x1) << 1) | ((self.ySingleClick & 0x1) << 2) | ((self.yDoubleClick & 0x1) << 3) | ((self.zSingleClick & 0x1) << 4) | ((self.zDoubleClick & 0x1) << 5)

        def setValue(self, value: int):
            self.xSingleClick = ((value >> 0) & 0x1)
            self.xDoubleClick = ((value >> 1) & 0x1)
            self.ySingleClick = ((value >> 2) & 0x1)
            self.yDoubleClick = ((value >> 3) & 0x1)
            self.zSingleClick = ((value >> 4) & 0x1)
            self.zDoubleClick = ((value >> 5) & 0x1)

        def __str__(self):
            retVal = ""
            retVal += "XSingleClick: {} (offset: 0, width: 1)\r\n".format(self.xSingleClick)
            retVal += "XDoubleClick: {} (offset: 1, width: 1)\r\n".format(self.xDoubleClick)
            retVal += "YSingleClick: {} (offset: 2, width: 1)\r\n".format(self.ySingleClick)
            retVal += "YDoubleClick: {} (offset: 3, width: 1)\r\n".format(self.yDoubleClick)
            retVal += "ZSingleClick: {} (offset: 4, width: 1)\r\n".format(self.zSingleClick)
            retVal += "ZDoubleClick: {} (offset: 5, width: 1)\r\n".format(self.zDoubleClick)
            return retVal

    class ClickSourceRegister(Register):
        def __init__(self, reg_manager: RegisterManager):
            Register.__init__(self, reg_manager, 0x39, 1, False)
            self.x = 0
            self.y = 0
            self.z = 0
            self.sign = 0
            self.singleClickEn = 0
            self.doubleClickEn = 0
            self.interruptActive = 0


        def read(self):
            self._manager.read(self)
            return self
            
        def getValue(self):
            return ((self.x & 0x1) << 0) | ((self.y & 0x1) << 1) | ((self.z & 0x1) << 2) | ((self.sign & 0x1) << 3) | ((self.singleClickEn & 0x1) << 4) | ((self.doubleClickEn & 0x1) << 5) | ((self.interruptActive & 0x1) << 6)

        def setValue(self, value: int):
            self.x = ((value >> 0) & 0x1)
            self.y = ((value >> 1) & 0x1)
            self.z = ((value >> 2) & 0x1)
            self.sign = ((value >> 3) & 0x1)
            self.singleClickEn = ((value >> 4) & 0x1)
            self.doubleClickEn = ((value >> 5) & 0x1)
            self.interruptActive = ((value >> 6) & 0x1)

        def __str__(self):
            retVal = ""
            retVal += "X: {} (offset: 0, width: 1)\r\n".format(self.x)
            retVal += "Y: {} (offset: 1, width: 1)\r\n".format(self.y)
            retVal += "Z: {} (offset: 2, width: 1)\r\n".format(self.z)
            retVal += "Sign: {} (offset: 3, width: 1)\r\n".format(self.sign)
            retVal += "SingleClickEn: {} (offset: 4, width: 1)\r\n".format(self.singleClickEn)
            retVal += "DoubleClickEn: {} (offset: 5, width: 1)\r\n".format(self.doubleClickEn)
            retVal += "InterruptActive: {} (offset: 6, width: 1)\r\n".format(self.interruptActive)
            return retVal

    class ClickThresholdRegister(Register):
        def __init__(self, reg_manager: RegisterManager):
            Register.__init__(self, reg_manager, 0x3A, 1, False)
            self.value = 0


        def read(self):
            self._manager.read(self)
            return self
            
        def getValue(self):
            return ((self.value & 0x7F) << 0)

        def setValue(self, value: int):
            self.value = ((value >> 0) & 0x7F)

        def __str__(self):
            retVal = ""
            retVal += "Value: {} (offset: 0, width: 7)\r\n".format(self.value)
            return retVal

    class TimeLimitRegister(Register):
        def __init__(self, reg_manager: RegisterManager):
            Register.__init__(self, reg_manager, 0x3b, 1, False)
            self.value = 0


        def read(self):
            self._manager.read(self)
            return self
            
        def getValue(self):
            return ((self.value & 0x7F) << 0)

        def setValue(self, value: int):
            self.value = ((value >> 0) & 0x7F)

        def __str__(self):
            retVal = ""
            retVal += "Value: {} (offset: 0, width: 7)\r\n".format(self.value)
            return retVal

    class TimeLatencyRegister(Register):
        def __init__(self, reg_manager: RegisterManager):
            Register.__init__(self, reg_manager, 0x3c, 1, False)
            self.value = 0


        def read(self):
            self._manager.read(self)
            return self
            
        def getValue(self):
            return ((self.value & 0xFF) << 0)

        def setValue(self, value: int):
            self.value = ((value >> 0) & 0xFF)

        def __str__(self):
            retVal = ""
            retVal += "Value: {} (offset: 0, width: 8)\r\n".format(self.value)
            return retVal

    class TimeWindowRegister(Register):
        def __init__(self, reg_manager: RegisterManager):
            Register.__init__(self, reg_manager, 0x3d, 1, False)
            self.value = 0


        def read(self):
            self._manager.read(self)
            return self
            
        def getValue(self):
            return ((self.value & 0xFF) << 0)

        def setValue(self, value: int):
            self.value = ((value >> 0) & 0xFF)

        def __str__(self):
            retVal = ""
            retVal += "Value: {} (offset: 0, width: 8)\r\n".format(self.value)
            return retVal

    class ActivationThresholdRegister(Register):
        def __init__(self, reg_manager: RegisterManager):
            Register.__init__(self, reg_manager, 0x3e, 1, False)
            self.value = 0


        def read(self):
            self._manager.read(self)
            return self
            
        def getValue(self):
            return ((self.value & 0xFF) << 0)

        def setValue(self, value: int):
            self.value = ((value >> 0) & 0xFF)

        def __str__(self):
            retVal = ""
            retVal += "Value: {} (offset: 0, width: 8)\r\n".format(self.value)
            return retVal

    class ActivationDurationRegister(Register):
        def __init__(self, reg_manager: RegisterManager):
            Register.__init__(self, reg_manager, 0x3f, 1, False)
            self.value = 0


        def read(self):
            self._manager.read(self)
            return self
            
        def getValue(self):
            return ((self.value & 0xFF) << 0)

        def setValue(self, value: int):
            self.value = ((value >> 0) & 0xFF)

        def __str__(self):
            retVal = ""
            retVal += "Value: {} (offset: 0, width: 8)\r\n".format(self.value)
            return retVal

