# 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_max30100
else:
    import _pyupm_max30100

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__)


import weakref


def getVersion():
    return _pyupm_max30100.getVersion()
MAX30100_I2C_ADDRESS = _pyupm_max30100.MAX30100_I2C_ADDRESS
class max30100_value(object):
    thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
    __repr__ = _swig_repr
    IR = property(_pyupm_max30100.max30100_value_IR_get, _pyupm_max30100.max30100_value_IR_set)
    R = property(_pyupm_max30100.max30100_value_R_get, _pyupm_max30100.max30100_value_R_set)

    def __init__(self):
        _pyupm_max30100.max30100_value_swiginit(self, _pyupm_max30100.new_max30100_value())
    __swig_destroy__ = _pyupm_max30100.delete_max30100_value

# Register max30100_value in _pyupm_max30100:
_pyupm_max30100.max30100_value_swigregister(max30100_value)

MAX30100_SAMPLE_STATE_IDLE = _pyupm_max30100.MAX30100_SAMPLE_STATE_IDLE
MAX30100_SAMPLE_STATE_ONE_SHOT = _pyupm_max30100.MAX30100_SAMPLE_STATE_ONE_SHOT
MAX30100_SAMPLE_STATE_CONTINUOUS = _pyupm_max30100.MAX30100_SAMPLE_STATE_CONTINUOUS
MAX30100_SAMPLE_STATE_CONTINUOUS_BUFFERED = _pyupm_max30100.MAX30100_SAMPLE_STATE_CONTINUOUS_BUFFERED
MAX30100_REG_INTERRUPT_STATUS = _pyupm_max30100.MAX30100_REG_INTERRUPT_STATUS
MAX30100_REG_INTERRUPT_ENABLE = _pyupm_max30100.MAX30100_REG_INTERRUPT_ENABLE
MAX30100_REG_FIFO_WR_PTR = _pyupm_max30100.MAX30100_REG_FIFO_WR_PTR
MAX30100_REG_FIFO_OVF_COUNTER = _pyupm_max30100.MAX30100_REG_FIFO_OVF_COUNTER
MAX30100_REG_FIFO_RD_PTR = _pyupm_max30100.MAX30100_REG_FIFO_RD_PTR
MAX30100_REG_FIFO_DATA = _pyupm_max30100.MAX30100_REG_FIFO_DATA
MAX30100_REG_MODE_CONFIG = _pyupm_max30100.MAX30100_REG_MODE_CONFIG
MAX30100_REG_SPO2_CONFIG = _pyupm_max30100.MAX30100_REG_SPO2_CONFIG
MAX30100_REG_LED_CONFIG = _pyupm_max30100.MAX30100_REG_LED_CONFIG
MAX30100_REG_TEMP_INTEGER = _pyupm_max30100.MAX30100_REG_TEMP_INTEGER
MAX30100_REG_TEMP_FRACTION = _pyupm_max30100.MAX30100_REG_TEMP_FRACTION
MAX30100_REG_REV_ID = _pyupm_max30100.MAX30100_REG_REV_ID
MAX30100_REG_PART_ID = _pyupm_max30100.MAX30100_REG_PART_ID
MAX30100_A_FULL = _pyupm_max30100.MAX30100_A_FULL
MAX30100_TEMP_RDY = _pyupm_max30100.MAX30100_TEMP_RDY
MAX30100_HR_RDY = _pyupm_max30100.MAX30100_HR_RDY
MAX30100_SPO2_RDY = _pyupm_max30100.MAX30100_SPO2_RDY
MAX30100_PWR_RDY = _pyupm_max30100.MAX30100_PWR_RDY
MAX30100_EN_A_FULL = _pyupm_max30100.MAX30100_EN_A_FULL
MAX30100_EN_TEMP_RDY = _pyupm_max30100.MAX30100_EN_TEMP_RDY
MAX30100_EN_HR_RDY = _pyupm_max30100.MAX30100_EN_HR_RDY
MAX30100_EN_SPO2_RDY = _pyupm_max30100.MAX30100_EN_SPO2_RDY
MAX30100_SHDN = _pyupm_max30100.MAX30100_SHDN
MAX30100_RESET = _pyupm_max30100.MAX30100_RESET
MAX30100_TEMP_EN = _pyupm_max30100.MAX30100_TEMP_EN
MAX30100_MODE_DISABLED = _pyupm_max30100.MAX30100_MODE_DISABLED
MAX30100_MODE_HR_EN = _pyupm_max30100.MAX30100_MODE_HR_EN
MAX30100_MODE_SPO2_EN = _pyupm_max30100.MAX30100_MODE_SPO2_EN
MAX30100_SPO2_HI_RES_EN = _pyupm_max30100.MAX30100_SPO2_HI_RES_EN
MAX30100_SR_50_HZ = _pyupm_max30100.MAX30100_SR_50_HZ
MAX30100_SR_100_HZ = _pyupm_max30100.MAX30100_SR_100_HZ
MAX30100_SR_167_HZ = _pyupm_max30100.MAX30100_SR_167_HZ
MAX30100_SR_200_HZ = _pyupm_max30100.MAX30100_SR_200_HZ
MAX30100_SR_400_HZ = _pyupm_max30100.MAX30100_SR_400_HZ
MAX30100_SR_600_HZ = _pyupm_max30100.MAX30100_SR_600_HZ
MAX30100_SR_900_HZ = _pyupm_max30100.MAX30100_SR_900_HZ
MAX30100_SR_1000_HZ = _pyupm_max30100.MAX30100_SR_1000_HZ
MAX30100_LED_PW_200_US_13_BITS = _pyupm_max30100.MAX30100_LED_PW_200_US_13_BITS
MAX30100_LED_PW_400_US_14_BITS = _pyupm_max30100.MAX30100_LED_PW_400_US_14_BITS
MAX30100_LED_PW_800_US_15_BITS = _pyupm_max30100.MAX30100_LED_PW_800_US_15_BITS
MAX30100_LED_PW_1600_US_16_BITS = _pyupm_max30100.MAX30100_LED_PW_1600_US_16_BITS
MAX30100_LED_CURRENT_0_0_MA = _pyupm_max30100.MAX30100_LED_CURRENT_0_0_MA
MAX30100_LED_CURRENT_4_4_MA = _pyupm_max30100.MAX30100_LED_CURRENT_4_4_MA
MAX30100_LED_CURRENT_7_6_MA = _pyupm_max30100.MAX30100_LED_CURRENT_7_6_MA
MAX30100_LED_CURRENT_11_0_MA = _pyupm_max30100.MAX30100_LED_CURRENT_11_0_MA
MAX30100_LED_CURRENT_14_2_MA = _pyupm_max30100.MAX30100_LED_CURRENT_14_2_MA
MAX30100_LED_CURRENT_17_4_MA = _pyupm_max30100.MAX30100_LED_CURRENT_17_4_MA
MAX30100_LED_CURRENT_20_8_MA = _pyupm_max30100.MAX30100_LED_CURRENT_20_8_MA
MAX30100_LED_CURRENT_24_0_MA = _pyupm_max30100.MAX30100_LED_CURRENT_24_0_MA
MAX30100_LED_CURRENT_27_1_MA = _pyupm_max30100.MAX30100_LED_CURRENT_27_1_MA
MAX30100_LED_CURRENT_30_6_MA = _pyupm_max30100.MAX30100_LED_CURRENT_30_6_MA
MAX30100_LED_CURRENT_33_8_MA = _pyupm_max30100.MAX30100_LED_CURRENT_33_8_MA
MAX30100_LED_CURRENT_37_0_MA = _pyupm_max30100.MAX30100_LED_CURRENT_37_0_MA
MAX30100_LED_CURRENT_40_2_MA = _pyupm_max30100.MAX30100_LED_CURRENT_40_2_MA
MAX30100_LED_CURRENT_43_6_MA = _pyupm_max30100.MAX30100_LED_CURRENT_43_6_MA
MAX30100_LED_CURRENT_46_8_MA = _pyupm_max30100.MAX30100_LED_CURRENT_46_8_MA
MAX30100_LED_CURRENT_50_0_MA = _pyupm_max30100.MAX30100_LED_CURRENT_50_0_MA
class Callback(object):
    thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
    __repr__ = _swig_repr
    __swig_destroy__ = _pyupm_max30100.delete_Callback

    def run(self, samp):
        return _pyupm_max30100.Callback_run(self, samp)

    def __init__(self):
        if self.__class__ == Callback:
            _self = None
        else:
            _self = self
        _pyupm_max30100.Callback_swiginit(self, _pyupm_max30100.new_Callback(_self, ))
    def __disown__(self):
        self.this.disown()
        _pyupm_max30100.disown_Callback(self)
        return weakref.proxy(self)

# Register Callback in _pyupm_max30100:
_pyupm_max30100.Callback_swigregister(Callback)

class MAX30100(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, i2c_bus):
        _pyupm_max30100.MAX30100_swiginit(self, _pyupm_max30100.new_MAX30100(i2c_bus))
    __swig_destroy__ = _pyupm_max30100.delete_MAX30100

    def sample(self):
        return _pyupm_max30100.MAX30100_sample(self)

    def sample_continuous(self, gpio_pin, buffered, cb=None):
        return _pyupm_max30100.MAX30100_sample_continuous(self, gpio_pin, buffered, cb)

    def sample_stop(self):
        return _pyupm_max30100.MAX30100_sample_stop(self)

    def read(self, reg):
        return _pyupm_max30100.MAX30100_read(self, reg)

    def write(self, reg, wr_data):
        return _pyupm_max30100.MAX30100_write(self, reg, wr_data)

    def version(self):
        return _pyupm_max30100.MAX30100_version(self)

    def temperature(self):
        return _pyupm_max30100.MAX30100_temperature(self)

    def mode(self, *args):
        return _pyupm_max30100.MAX30100_mode(self, *args)

    def high_res_enable(self, *args):
        return _pyupm_max30100.MAX30100_high_res_enable(self, *args)

    def sample_rate(self, *args):
        return _pyupm_max30100.MAX30100_sample_rate(self, *args)

    def pulse_width(self, *args):
        return _pyupm_max30100.MAX30100_pulse_width(self, *args)

    def current(self, ir, r):
        return _pyupm_max30100.MAX30100_current(self, ir, r)

    def current_ir(self):
        return _pyupm_max30100.MAX30100_current_ir(self)

    def current_r(self):
        return _pyupm_max30100.MAX30100_current_r(self)

    def reset(self):
        return _pyupm_max30100.MAX30100_reset(self)

    def sleep(self, sleep):
        return _pyupm_max30100.MAX30100_sleep(self, sleep)
    _callback = property(_pyupm_max30100.MAX30100__callback_get, _pyupm_max30100.MAX30100__callback_set)

# Register MAX30100 in _pyupm_max30100:
_pyupm_max30100.MAX30100_swigregister(MAX30100)



