# 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_ads1x15
else:
    import _pyupm_ads1x15

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_ads1x15.getVersion()
ADS1X15_ADDRESS = _pyupm_ads1x15.ADS1X15_ADDRESS
ADS1X15_REG_POINTER_MASK = _pyupm_ads1x15.ADS1X15_REG_POINTER_MASK
ADS1X15_REG_POINTER_CONVERT = _pyupm_ads1x15.ADS1X15_REG_POINTER_CONVERT
ADS1X15_REG_POINTER_CONFIG = _pyupm_ads1x15.ADS1X15_REG_POINTER_CONFIG
ADS1X15_REG_POINTER_LOWTHRESH = _pyupm_ads1x15.ADS1X15_REG_POINTER_LOWTHRESH
ADS1X15_REG_POINTER_HITHRESH = _pyupm_ads1x15.ADS1X15_REG_POINTER_HITHRESH
ADS1X15_OS_MASK = _pyupm_ads1x15.ADS1X15_OS_MASK
ADS1X15_OS_SINGLE = _pyupm_ads1x15.ADS1X15_OS_SINGLE
ADS1X15_OS_BUSY = _pyupm_ads1x15.ADS1X15_OS_BUSY
ADS1X15_OS_NOTBUSY = _pyupm_ads1x15.ADS1X15_OS_NOTBUSY
ADS1X15_MUX_MASK = _pyupm_ads1x15.ADS1X15_MUX_MASK
ADS1X15_MUX_DIFF_0_1 = _pyupm_ads1x15.ADS1X15_MUX_DIFF_0_1
ADS1X15_MUX_DIFF_0_3 = _pyupm_ads1x15.ADS1X15_MUX_DIFF_0_3
ADS1X15_MUX_DIFF_1_3 = _pyupm_ads1x15.ADS1X15_MUX_DIFF_1_3
ADS1X15_MUX_DIFF_2_3 = _pyupm_ads1x15.ADS1X15_MUX_DIFF_2_3
ADS1X15_MUX_SINGLE_0 = _pyupm_ads1x15.ADS1X15_MUX_SINGLE_0
ADS1X15_MUX_SINGLE_1 = _pyupm_ads1x15.ADS1X15_MUX_SINGLE_1
ADS1X15_MUX_SINGLE_2 = _pyupm_ads1x15.ADS1X15_MUX_SINGLE_2
ADS1X15_MUX_SINGLE_3 = _pyupm_ads1x15.ADS1X15_MUX_SINGLE_3
ADS1X15_PGA_MASK = _pyupm_ads1x15.ADS1X15_PGA_MASK
ADS1X15_PGA_6_144V = _pyupm_ads1x15.ADS1X15_PGA_6_144V
ADS1X15_PGA_4_096V = _pyupm_ads1x15.ADS1X15_PGA_4_096V
ADS1X15_PGA_2_048V = _pyupm_ads1x15.ADS1X15_PGA_2_048V
ADS1X15_PGA_1_024V = _pyupm_ads1x15.ADS1X15_PGA_1_024V
ADS1X15_PGA_0_512V = _pyupm_ads1x15.ADS1X15_PGA_0_512V
ADS1X15_PGA_0_256V = _pyupm_ads1x15.ADS1X15_PGA_0_256V
ADS1X15_MODE_MASK = _pyupm_ads1x15.ADS1X15_MODE_MASK
ADS1X15_MODE_CONTIN = _pyupm_ads1x15.ADS1X15_MODE_CONTIN
ADS1X15_MODE_SINGLE = _pyupm_ads1x15.ADS1X15_MODE_SINGLE
ADS1X15_DR_MASK = _pyupm_ads1x15.ADS1X15_DR_MASK
ADS1X15_CMODE_MASK = _pyupm_ads1x15.ADS1X15_CMODE_MASK
ADS1X15_CMODE_TRAD = _pyupm_ads1x15.ADS1X15_CMODE_TRAD
ADS1X15_CMODE_WINDOW = _pyupm_ads1x15.ADS1X15_CMODE_WINDOW
ADS1X15_CPOL_MASK = _pyupm_ads1x15.ADS1X15_CPOL_MASK
ADS1X15_CPOL_ACTVLOW = _pyupm_ads1x15.ADS1X15_CPOL_ACTVLOW
ADS1X15_CPOL_ACTVHI = _pyupm_ads1x15.ADS1X15_CPOL_ACTVHI
ADS1X15_CLAT_MASK = _pyupm_ads1x15.ADS1X15_CLAT_MASK
ADS1X15_CLAT_NONLAT = _pyupm_ads1x15.ADS1X15_CLAT_NONLAT
ADS1X15_CLAT_LATCH = _pyupm_ads1x15.ADS1X15_CLAT_LATCH
ADS1X15_CQUE_MASK = _pyupm_ads1x15.ADS1X15_CQUE_MASK
class ADS1X15(object):
    thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")

    def __init__(self, *args, **kwargs):
        raise AttributeError("No constructor defined - class is abstract")
    __repr__ = _swig_repr
    GAIN_TWOTHIRDS = _pyupm_ads1x15.ADS1X15_GAIN_TWOTHIRDS
    GAIN_ONE = _pyupm_ads1x15.ADS1X15_GAIN_ONE
    GAIN_TWO = _pyupm_ads1x15.ADS1X15_GAIN_TWO
    GAIN_FOUR = _pyupm_ads1x15.ADS1X15_GAIN_FOUR
    GAIN_EIGHT = _pyupm_ads1x15.ADS1X15_GAIN_EIGHT
    GAIN_SIXTEEN = _pyupm_ads1x15.ADS1X15_GAIN_SIXTEEN
    DIFF_0_1 = _pyupm_ads1x15.ADS1X15_DIFF_0_1
    DIFF_0_3 = _pyupm_ads1x15.ADS1X15_DIFF_0_3
    DIFF_1_3 = _pyupm_ads1x15.ADS1X15_DIFF_1_3
    DIFF_2_3 = _pyupm_ads1x15.ADS1X15_DIFF_2_3
    SINGLE_0 = _pyupm_ads1x15.ADS1X15_SINGLE_0
    SINGLE_1 = _pyupm_ads1x15.ADS1X15_SINGLE_1
    SINGLE_2 = _pyupm_ads1x15.ADS1X15_SINGLE_2
    SINGLE_3 = _pyupm_ads1x15.ADS1X15_SINGLE_3
    CQUE_1CONV = _pyupm_ads1x15.ADS1X15_CQUE_1CONV
    CQUE_2CONV = _pyupm_ads1x15.ADS1X15_CQUE_2CONV
    CQUE_4CONV = _pyupm_ads1x15.ADS1X15_CQUE_4CONV
    CQUE_NONE = _pyupm_ads1x15.ADS1X15_CQUE_NONE
    THRESH_LOW = _pyupm_ads1x15.ADS1X15_THRESH_LOW
    THRESH_HIGH = _pyupm_ads1x15.ADS1X15_THRESH_HIGH
    CONVERSION_RDY = _pyupm_ads1x15.ADS1X15_CONVERSION_RDY
    THRESH_DEFAULT = _pyupm_ads1x15.ADS1X15_THRESH_DEFAULT
    SPS_DEFAULT = _pyupm_ads1x15.ADS1X15_SPS_DEFAULT
    __swig_destroy__ = _pyupm_ads1x15.delete_ADS1X15

    def name(self):
        return _pyupm_ads1x15.ADS1X15_name(self)

    def getLastSample(self, *args):
        return _pyupm_ads1x15.ADS1X15_getLastSample(self, *args)

    def getSample(self, *args):
        return _pyupm_ads1x15.ADS1X15_getSample(self, *args)

    def getGain(self):
        return _pyupm_ads1x15.ADS1X15_getGain(self)

    def setGain(self, *args):
        return _pyupm_ads1x15.ADS1X15_setGain(self, *args)

    def getSPS(self):
        return _pyupm_ads1x15.ADS1X15_getSPS(self)

    def setSPS(self, rate):
        return _pyupm_ads1x15.ADS1X15_setSPS(self, rate)

    def getCompMode(self):
        return _pyupm_ads1x15.ADS1X15_getCompMode(self)

    def setCompMode(self, mode=False):
        return _pyupm_ads1x15.ADS1X15_setCompMode(self, mode)

    def getCompPol(self):
        return _pyupm_ads1x15.ADS1X15_getCompPol(self)

    def setCompPol(self, mode=False):
        return _pyupm_ads1x15.ADS1X15_setCompPol(self, mode)

    def getCompLatch(self):
        return _pyupm_ads1x15.ADS1X15_getCompLatch(self)

    def setCompLatch(self, mode=False):
        return _pyupm_ads1x15.ADS1X15_setCompLatch(self, mode)

    def getCompQue(self):
        return _pyupm_ads1x15.ADS1X15_getCompQue(self)

    def setCompQue(self, *args):
        return _pyupm_ads1x15.ADS1X15_setCompQue(self, *args)

    def getContinuous(self):
        return _pyupm_ads1x15.ADS1X15_getContinuous(self)

    def setContinuous(self, mode=False):
        return _pyupm_ads1x15.ADS1X15_setContinuous(self, mode)

    def getThresh(self, *args):
        return _pyupm_ads1x15.ADS1X15_getThresh(self, *args)

    def setThresh(self, *args):
        return _pyupm_ads1x15.ADS1X15_setThresh(self, *args)

    def getLeftoverStr(self):
        return _pyupm_ads1x15.ADS1X15_getLeftoverStr(self)

# Register ADS1X15 in _pyupm_ads1x15:
_pyupm_ads1x15.ADS1X15_swigregister(ADS1X15)

ADS1115_CONVERSIONDELAY = _pyupm_ads1x15.ADS1115_CONVERSIONDELAY
ADS1115_DR_MASK = _pyupm_ads1x15.ADS1115_DR_MASK
ADS1115_DR_8SPS = _pyupm_ads1x15.ADS1115_DR_8SPS
ADS1115_DR_16SPS = _pyupm_ads1x15.ADS1115_DR_16SPS
ADS1115_DR_32SPS = _pyupm_ads1x15.ADS1115_DR_32SPS
ADS1115_DR_64SPS = _pyupm_ads1x15.ADS1115_DR_64SPS
ADS1115_DR_128SPS = _pyupm_ads1x15.ADS1115_DR_128SPS
ADS1115_DR_250SPS = _pyupm_ads1x15.ADS1115_DR_250SPS
ADS1115_DR_475SPS = _pyupm_ads1x15.ADS1115_DR_475SPS
ADS1115_DR_860SPS = _pyupm_ads1x15.ADS1115_DR_860SPS
class ADS1115(ADS1X15):
    thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
    __repr__ = _swig_repr
    SPS_8 = _pyupm_ads1x15.ADS1115_SPS_8
    SPS_16 = _pyupm_ads1x15.ADS1115_SPS_16
    SPS_32 = _pyupm_ads1x15.ADS1115_SPS_32
    SPS_64 = _pyupm_ads1x15.ADS1115_SPS_64
    SPS_128 = _pyupm_ads1x15.ADS1115_SPS_128
    SPS_250 = _pyupm_ads1x15.ADS1115_SPS_250
    SPS_475 = _pyupm_ads1x15.ADS1115_SPS_475
    SPS_860 = _pyupm_ads1x15.ADS1115_SPS_860

    def __init__(self, *args):
        _pyupm_ads1x15.ADS1115_swiginit(self, _pyupm_ads1x15.new_ADS1115(*args))
    __swig_destroy__ = _pyupm_ads1x15.delete_ADS1115

    def setSPS(self, *args):
        return _pyupm_ads1x15.ADS1115_setSPS(self, *args)

# Register ADS1115 in _pyupm_ads1x15:
_pyupm_ads1x15.ADS1115_swigregister(ADS1115)

ADS1015_VREF = _pyupm_ads1x15.ADS1015_VREF
ADS1015_CONVERSIONDELAY = _pyupm_ads1x15.ADS1015_CONVERSIONDELAY
ADS1015_DR_MASK = _pyupm_ads1x15.ADS1015_DR_MASK
ADS1015_DR_128SPS = _pyupm_ads1x15.ADS1015_DR_128SPS
ADS1015_DR_250SPS = _pyupm_ads1x15.ADS1015_DR_250SPS
ADS1015_DR_490SPS = _pyupm_ads1x15.ADS1015_DR_490SPS
ADS1015_DR_920SPS = _pyupm_ads1x15.ADS1015_DR_920SPS
ADS1015_DR_1600SPS = _pyupm_ads1x15.ADS1015_DR_1600SPS
ADS1015_DR_2400SPS = _pyupm_ads1x15.ADS1015_DR_2400SPS
ADS1015_DR_3300SPS = _pyupm_ads1x15.ADS1015_DR_3300SPS
class ADS1015(ADS1X15):
    thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
    __repr__ = _swig_repr
    SPS_128 = _pyupm_ads1x15.ADS1015_SPS_128
    SPS_250 = _pyupm_ads1x15.ADS1015_SPS_250
    SPS_490 = _pyupm_ads1x15.ADS1015_SPS_490
    SPS_920 = _pyupm_ads1x15.ADS1015_SPS_920
    SPS_1600 = _pyupm_ads1x15.ADS1015_SPS_1600
    SPS_2400 = _pyupm_ads1x15.ADS1015_SPS_2400
    SPS_3300 = _pyupm_ads1x15.ADS1015_SPS_3300

    def __init__(self, *args):
        _pyupm_ads1x15.ADS1015_swiginit(self, _pyupm_ads1x15.new_ADS1015(*args))
    __swig_destroy__ = _pyupm_ads1x15.delete_ADS1015

    def setSPS(self, *args):
        return _pyupm_ads1x15.ADS1015_setSPS(self, *args)

    def getNumInputs(self):
        return _pyupm_ads1x15.ADS1015_getNumInputs(self)

    def getRawValue(self, input):
        return _pyupm_ads1x15.ADS1015_getRawValue(self, input)

    def getVoltage(self, input):
        return _pyupm_ads1x15.ADS1015_getVoltage(self, input)

    def getResolutionInBits(self):
        return _pyupm_ads1x15.ADS1015_getResolutionInBits(self)

    def getModuleName(self):
        return _pyupm_ads1x15.ADS1015_getModuleName(self)

# Register ADS1015 in _pyupm_ads1x15:
_pyupm_ads1x15.ADS1015_swigregister(ADS1015)



