# 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_adc121c021
else:
    import _pyupm_adc121c021

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_adc121c021.getVersion()
ADC121C021_I2C_BUS = _pyupm_adc121c021.ADC121C021_I2C_BUS
ADC121C021_DEFAULT_I2C_ADDR = _pyupm_adc121c021.ADC121C021_DEFAULT_I2C_ADDR
ADC121C021_RESOLUTION = _pyupm_adc121c021.ADC121C021_RESOLUTION
ADC121C021_REG_RESULT = _pyupm_adc121c021.ADC121C021_REG_RESULT
ADC121C021_REG_ALERT_STATUS = _pyupm_adc121c021.ADC121C021_REG_ALERT_STATUS
ADC121C021_REG_CONFIG = _pyupm_adc121c021.ADC121C021_REG_CONFIG
ADC121C021_REG_ALERT_LIM_UNDER = _pyupm_adc121c021.ADC121C021_REG_ALERT_LIM_UNDER
ADC121C021_REG_ALERT_LIM_OVER = _pyupm_adc121c021.ADC121C021_REG_ALERT_LIM_OVER
ADC121C021_REG_ALERT_HYS = _pyupm_adc121c021.ADC121C021_REG_ALERT_HYS
ADC121C021_REG_LOWEST_CONV = _pyupm_adc121c021.ADC121C021_REG_LOWEST_CONV
ADC121C021_REG_HIGHEST_CONV = _pyupm_adc121c021.ADC121C021_REG_HIGHEST_CONV
ADC121C021_DEFAULT_VREF = _pyupm_adc121c021.ADC121C021_DEFAULT_VREF
ADC121C021_CYCLE_NONE = _pyupm_adc121c021.ADC121C021_CYCLE_NONE
ADC121C021_CYCLE_32 = _pyupm_adc121c021.ADC121C021_CYCLE_32
ADC121C021_CYCLE_64 = _pyupm_adc121c021.ADC121C021_CYCLE_64
ADC121C021_CYCLE_128 = _pyupm_adc121c021.ADC121C021_CYCLE_128
ADC121C021_CYCLE_256 = _pyupm_adc121c021.ADC121C021_CYCLE_256
ADC121C021_CYCLE_512 = _pyupm_adc121c021.ADC121C021_CYCLE_512
ADC121C021_CYCLE_1024 = _pyupm_adc121c021.ADC121C021_CYCLE_1024
ADC121C021_CYCLE_2048 = _pyupm_adc121c021.ADC121C021_CYCLE_2048
class ADC121C021(object):
    thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
    __repr__ = _swig_repr

    def __init__(self, *args):
        _pyupm_adc121c021.ADC121C021_swiginit(self, _pyupm_adc121c021.new_ADC121C021(*args))
    __swig_destroy__ = _pyupm_adc121c021.delete_ADC121C021

    def writeByte(self, reg, byte):
        return _pyupm_adc121c021.ADC121C021_writeByte(self, reg, byte)

    def writeWord(self, reg, word):
        return _pyupm_adc121c021.ADC121C021_writeWord(self, reg, word)

    def readByte(self, reg):
        return _pyupm_adc121c021.ADC121C021_readByte(self, reg)

    def readWord(self, reg):
        return _pyupm_adc121c021.ADC121C021_readWord(self, reg)

    def value(self):
        return _pyupm_adc121c021.ADC121C021_value(self)

    def valueToVolts(self, val):
        return _pyupm_adc121c021.ADC121C021_valueToVolts(self, val)

    def getAlertStatus(self):
        return _pyupm_adc121c021.ADC121C021_getAlertStatus(self)

    def alertLowTriggered(self):
        return _pyupm_adc121c021.ADC121C021_alertLowTriggered(self)

    def alertHighTriggered(self):
        return _pyupm_adc121c021.ADC121C021_alertHighTriggered(self)

    def clearAlertStatus(self):
        return _pyupm_adc121c021.ADC121C021_clearAlertStatus(self)

    def enableAlertFlag(self, enable):
        return _pyupm_adc121c021.ADC121C021_enableAlertFlag(self, enable)

    def enableAlertPin(self, enable):
        return _pyupm_adc121c021.ADC121C021_enableAlertPin(self, enable)

    def enableAlertHold(self, enable):
        return _pyupm_adc121c021.ADC121C021_enableAlertHold(self, enable)

    def enableAlertPinPolarityHigh(self, enable):
        return _pyupm_adc121c021.ADC121C021_enableAlertPinPolarityHigh(self, enable)

    def setAutomaticConversion(self, cycleTime):
        return _pyupm_adc121c021.ADC121C021_setAutomaticConversion(self, cycleTime)

    def setAlertLowLimit(self, limit):
        return _pyupm_adc121c021.ADC121C021_setAlertLowLimit(self, limit)

    def setAlertHighLimit(self, limit):
        return _pyupm_adc121c021.ADC121C021_setAlertHighLimit(self, limit)

    def setHysteresis(self, limit):
        return _pyupm_adc121c021.ADC121C021_setHysteresis(self, limit)

    def getHighestConversion(self):
        return _pyupm_adc121c021.ADC121C021_getHighestConversion(self)

    def getLowestConversion(self):
        return _pyupm_adc121c021.ADC121C021_getLowestConversion(self)

    def clearHighestConversion(self):
        return _pyupm_adc121c021.ADC121C021_clearHighestConversion(self)

    def clearLowestConversion(self):
        return _pyupm_adc121c021.ADC121C021_clearLowestConversion(self)

# Register ADC121C021 in _pyupm_adc121c021:
_pyupm_adc121c021.ADC121C021_swigregister(ADC121C021)



