# This file was automatically generated by SWIG (http://www.swig.org).
# Version 4.0.2
#
# Do not make changes to this file unless you know what you are doing--modify
# the SWIG interface file instead.

from sys import version_info as _swig_python_version_info
if _swig_python_version_info < (2, 7, 0):
    raise RuntimeError("Python 2.7 or later required")

# Import the low-level C/C++ module
if __package__ or "." in __name__:
    from . import _pyupm_at42qt1070
else:
    import _pyupm_at42qt1070

try:
    import builtins as __builtin__
except ImportError:
    import __builtin__

def _swig_repr(self):
    try:
        strthis = "proxy of " + self.this.__repr__()
    except __builtin__.Exception:
        strthis = ""
    return "<%s.%s; %s >" % (self.__class__.__module__, self.__class__.__name__, strthis,)


def _swig_setattr_nondynamic_instance_variable(set):
    def set_instance_attr(self, name, value):
        if name == "thisown":
            self.this.own(value)
        elif name == "this":
            set(self, name, value)
        elif hasattr(self, name) and isinstance(getattr(type(self), name), property):
            set(self, name, value)
        else:
            raise AttributeError("You cannot add instance attributes to %s" % self)
    return set_instance_attr


def _swig_setattr_nondynamic_class_variable(set):
    def set_class_attr(cls, name, value):
        if hasattr(cls, name) and not isinstance(getattr(cls, name), property):
            set(cls, name, value)
        else:
            raise AttributeError("You cannot add class attributes to %s" % cls)
    return set_class_attr


def _swig_add_metaclass(metaclass):
    """Class decorator for adding a metaclass to a SWIG wrapped class - a slimmed down version of six.add_metaclass"""
    def wrapper(cls):
        return metaclass(cls.__name__, cls.__bases__, cls.__dict__.copy())
    return wrapper


class _SwigNonDynamicMeta(type):
    """Meta class to enforce nondynamic attributes (no new attributes) for a class"""
    __setattr__ = _swig_setattr_nondynamic_class_variable(type.__setattr__)



def getVersion():
    return _pyupm_at42qt1070.getVersion()
AT42QT1070_I2C_BUS = _pyupm_at42qt1070.AT42QT1070_I2C_BUS
AT42QT1070_DEFAULT_I2C_ADDR = _pyupm_at42qt1070.AT42QT1070_DEFAULT_I2C_ADDR
class AT42QT1070(object):
    thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
    __repr__ = _swig_repr
    REG_CHIPID = _pyupm_at42qt1070.AT42QT1070_REG_CHIPID
    REG_FWVERS = _pyupm_at42qt1070.AT42QT1070_REG_FWVERS
    REG_DETSTATUS = _pyupm_at42qt1070.AT42QT1070_REG_DETSTATUS
    REG_KEYSTATUS = _pyupm_at42qt1070.AT42QT1070_REG_KEYSTATUS
    REG_KEYSIG0_H = _pyupm_at42qt1070.AT42QT1070_REG_KEYSIG0_H
    REG_KEYSIG0_L = _pyupm_at42qt1070.AT42QT1070_REG_KEYSIG0_L
    REG_KEYSIG1_H = _pyupm_at42qt1070.AT42QT1070_REG_KEYSIG1_H
    REG_KEYSIG1_L = _pyupm_at42qt1070.AT42QT1070_REG_KEYSIG1_L
    REG_KEYSIG2_H = _pyupm_at42qt1070.AT42QT1070_REG_KEYSIG2_H
    REG_KEYSIG2_L = _pyupm_at42qt1070.AT42QT1070_REG_KEYSIG2_L
    REG_KEYSIG3_H = _pyupm_at42qt1070.AT42QT1070_REG_KEYSIG3_H
    REG_KEYSIG3_L = _pyupm_at42qt1070.AT42QT1070_REG_KEYSIG3_L
    REG_KEYSIG4_H = _pyupm_at42qt1070.AT42QT1070_REG_KEYSIG4_H
    REG_KEYSIG4_L = _pyupm_at42qt1070.AT42QT1070_REG_KEYSIG4_L
    REG_KEYSIG5_H = _pyupm_at42qt1070.AT42QT1070_REG_KEYSIG5_H
    REG_KEYSIG5_L = _pyupm_at42qt1070.AT42QT1070_REG_KEYSIG5_L
    REG_KEYSIG6_H = _pyupm_at42qt1070.AT42QT1070_REG_KEYSIG6_H
    REG_KEYSIG6_L = _pyupm_at42qt1070.AT42QT1070_REG_KEYSIG6_L
    REG_REFDATA0_H = _pyupm_at42qt1070.AT42QT1070_REG_REFDATA0_H
    REG_REFDATA0_L = _pyupm_at42qt1070.AT42QT1070_REG_REFDATA0_L
    REG_REFDATA1_H = _pyupm_at42qt1070.AT42QT1070_REG_REFDATA1_H
    REG_REFDATA1_L = _pyupm_at42qt1070.AT42QT1070_REG_REFDATA1_L
    REG_REFDATA2_H = _pyupm_at42qt1070.AT42QT1070_REG_REFDATA2_H
    REG_REFDATA2_L = _pyupm_at42qt1070.AT42QT1070_REG_REFDATA2_L
    REG_REFDATA3_H = _pyupm_at42qt1070.AT42QT1070_REG_REFDATA3_H
    REG_REFDATA3_L = _pyupm_at42qt1070.AT42QT1070_REG_REFDATA3_L
    REG_REFDATA4_H = _pyupm_at42qt1070.AT42QT1070_REG_REFDATA4_H
    REG_REFDATA4_L = _pyupm_at42qt1070.AT42QT1070_REG_REFDATA4_L
    REG_REFDATA5_H = _pyupm_at42qt1070.AT42QT1070_REG_REFDATA5_H
    REG_REFDATA5_L = _pyupm_at42qt1070.AT42QT1070_REG_REFDATA5_L
    REG_REFDATA6_H = _pyupm_at42qt1070.AT42QT1070_REG_REFDATA6_H
    REG_REFDATA6_L = _pyupm_at42qt1070.AT42QT1070_REG_REFDATA6_L
    REG_NTHR0 = _pyupm_at42qt1070.AT42QT1070_REG_NTHR0
    REG_NTHR1 = _pyupm_at42qt1070.AT42QT1070_REG_NTHR1
    REG_NTHR2 = _pyupm_at42qt1070.AT42QT1070_REG_NTHR2
    REG_NTHR3 = _pyupm_at42qt1070.AT42QT1070_REG_NTHR3
    REG_NTHR4 = _pyupm_at42qt1070.AT42QT1070_REG_NTHR4
    REG_NTHR5 = _pyupm_at42qt1070.AT42QT1070_REG_NTHR5
    REG_NTHR6 = _pyupm_at42qt1070.AT42QT1070_REG_NTHR6
    REG_AVE0 = _pyupm_at42qt1070.AT42QT1070_REG_AVE0
    REG_AVE1 = _pyupm_at42qt1070.AT42QT1070_REG_AVE1
    REG_AVE2 = _pyupm_at42qt1070.AT42QT1070_REG_AVE2
    REG_AVE3 = _pyupm_at42qt1070.AT42QT1070_REG_AVE3
    REG_AVE4 = _pyupm_at42qt1070.AT42QT1070_REG_AVE4
    REG_AVE5 = _pyupm_at42qt1070.AT42QT1070_REG_AVE5
    REG_AVE6 = _pyupm_at42qt1070.AT42QT1070_REG_AVE6
    REG_DI0 = _pyupm_at42qt1070.AT42QT1070_REG_DI0
    REG_DI1 = _pyupm_at42qt1070.AT42QT1070_REG_DI1
    REG_DI2 = _pyupm_at42qt1070.AT42QT1070_REG_DI2
    REG_DI3 = _pyupm_at42qt1070.AT42QT1070_REG_DI3
    REG_DI4 = _pyupm_at42qt1070.AT42QT1070_REG_DI4
    REG_DI5 = _pyupm_at42qt1070.AT42QT1070_REG_DI5
    REG_DI6 = _pyupm_at42qt1070.AT42QT1070_REG_DI6
    REG_GUARD = _pyupm_at42qt1070.AT42QT1070_REG_GUARD
    REG_LP = _pyupm_at42qt1070.AT42QT1070_REG_LP
    REG_MAXON = _pyupm_at42qt1070.AT42QT1070_REG_MAXON
    REG_CALIBRATE = _pyupm_at42qt1070.AT42QT1070_REG_CALIBRATE
    REG_RESET = _pyupm_at42qt1070.AT42QT1070_REG_RESET
    DET_TOUCH = _pyupm_at42qt1070.AT42QT1070_DET_TOUCH
    DET_OVERFLOW = _pyupm_at42qt1070.AT42QT1070_DET_OVERFLOW
    DET_CALIBRATE = _pyupm_at42qt1070.AT42QT1070_DET_CALIBRATE

    def __init__(self, *args):
        _pyupm_at42qt1070.AT42QT1070_swiginit(self, _pyupm_at42qt1070.new_AT42QT1070(*args))
    __swig_destroy__ = _pyupm_at42qt1070.delete_AT42QT1070

    def writeByte(self, reg, byte):
        return _pyupm_at42qt1070.AT42QT1070_writeByte(self, reg, byte)

    def writeWord(self, reg, word):
        return _pyupm_at42qt1070.AT42QT1070_writeWord(self, reg, word)

    def readByte(self, reg):
        return _pyupm_at42qt1070.AT42QT1070_readByte(self, reg)

    def readWord(self, reg):
        return _pyupm_at42qt1070.AT42QT1070_readWord(self, reg)

    def readChipID(self):
        return _pyupm_at42qt1070.AT42QT1070_readChipID(self)

    def updateState(self):
        return _pyupm_at42qt1070.AT42QT1070_updateState(self)

    def getLPMode(self):
        return _pyupm_at42qt1070.AT42QT1070_getLPMode(self)

    def setLPMode(self, mode):
        return _pyupm_at42qt1070.AT42QT1070_setLPMode(self, mode)

    def getAVE(self, key):
        return _pyupm_at42qt1070.AT42QT1070_getAVE(self, key)

    def setAVE(self, key, ave):
        return _pyupm_at42qt1070.AT42QT1070_setAVE(self, key, ave)

    def getAKSGroup(self, key):
        return _pyupm_at42qt1070.AT42QT1070_getAKSGroup(self, key)

    def setAKSGroup(self, key, group):
        return _pyupm_at42qt1070.AT42QT1070_setAKSGroup(self, key, group)

    def isOverflowed(self):
        return _pyupm_at42qt1070.AT42QT1070_isOverflowed(self)

    def isCalibrating(self):
        return _pyupm_at42qt1070.AT42QT1070_isCalibrating(self)

    def reset(self):
        return _pyupm_at42qt1070.AT42QT1070_reset(self)

    def calibrate(self):
        return _pyupm_at42qt1070.AT42QT1070_calibrate(self)

    def getButtons(self):
        return _pyupm_at42qt1070.AT42QT1070_getButtons(self)

# Register AT42QT1070 in _pyupm_at42qt1070:
_pyupm_at42qt1070.AT42QT1070_swigregister(AT42QT1070)



