# 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_pca9685
else:
    import _pyupm_pca9685

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_pca9685.getVersion()
PCA9685_I2C_BUS = _pyupm_pca9685.PCA9685_I2C_BUS
PCA9685_DEFAULT_I2C_ADDR = _pyupm_pca9685.PCA9685_DEFAULT_I2C_ADDR
PCA9685_INTERNAL_OSC = _pyupm_pca9685.PCA9685_INTERNAL_OSC
PCA9685_ALL_LED = _pyupm_pca9685.PCA9685_ALL_LED
class PCA9685(object):
    thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
    __repr__ = _swig_repr
    REG_MODE1 = _pyupm_pca9685.PCA9685_REG_MODE1
    REG_MODE2 = _pyupm_pca9685.PCA9685_REG_MODE2
    REG_I2C_SA1 = _pyupm_pca9685.PCA9685_REG_I2C_SA1
    REG_I2C_SA2 = _pyupm_pca9685.PCA9685_REG_I2C_SA2
    REG_I2C_SA3 = _pyupm_pca9685.PCA9685_REG_I2C_SA3
    REG_ALLCALL = _pyupm_pca9685.PCA9685_REG_ALLCALL
    REG_LED0_ON_L = _pyupm_pca9685.PCA9685_REG_LED0_ON_L
    REG_LED0_ON_H = _pyupm_pca9685.PCA9685_REG_LED0_ON_H
    REG_LED0_OFF_L = _pyupm_pca9685.PCA9685_REG_LED0_OFF_L
    REG_LED0_OFF_H = _pyupm_pca9685.PCA9685_REG_LED0_OFF_H
    REG_LED1_ON_L = _pyupm_pca9685.PCA9685_REG_LED1_ON_L
    REG_LED1_ON_H = _pyupm_pca9685.PCA9685_REG_LED1_ON_H
    REG_LED1_OFF_L = _pyupm_pca9685.PCA9685_REG_LED1_OFF_L
    REG_LED1_OFF_H = _pyupm_pca9685.PCA9685_REG_LED1_OFF_H
    REG_LED2_ON_L = _pyupm_pca9685.PCA9685_REG_LED2_ON_L
    REG_LED2_ON_H = _pyupm_pca9685.PCA9685_REG_LED2_ON_H
    REG_LED2_OFF_L = _pyupm_pca9685.PCA9685_REG_LED2_OFF_L
    REG_LED2_OFF_H = _pyupm_pca9685.PCA9685_REG_LED2_OFF_H
    REG_LED3_ON_L = _pyupm_pca9685.PCA9685_REG_LED3_ON_L
    REG_LED3_ON_H = _pyupm_pca9685.PCA9685_REG_LED3_ON_H
    REG_LED3_OFF_L = _pyupm_pca9685.PCA9685_REG_LED3_OFF_L
    REG_LED3_OFF_H = _pyupm_pca9685.PCA9685_REG_LED3_OFF_H
    REG_LED4_ON_L = _pyupm_pca9685.PCA9685_REG_LED4_ON_L
    REG_LED4_ON_H = _pyupm_pca9685.PCA9685_REG_LED4_ON_H
    REG_LED4_OFF_L = _pyupm_pca9685.PCA9685_REG_LED4_OFF_L
    REG_LED4_OFF_H = _pyupm_pca9685.PCA9685_REG_LED4_OFF_H
    REG_LED5_ON_L = _pyupm_pca9685.PCA9685_REG_LED5_ON_L
    REG_LED5_ON_H = _pyupm_pca9685.PCA9685_REG_LED5_ON_H
    REG_LED5_OFF_L = _pyupm_pca9685.PCA9685_REG_LED5_OFF_L
    REG_LED5_OFF_H = _pyupm_pca9685.PCA9685_REG_LED5_OFF_H
    REG_LED6_ON_L = _pyupm_pca9685.PCA9685_REG_LED6_ON_L
    REG_LED6_ON_H = _pyupm_pca9685.PCA9685_REG_LED6_ON_H
    REG_LED6_OFF_L = _pyupm_pca9685.PCA9685_REG_LED6_OFF_L
    REG_LED6_OFF_H = _pyupm_pca9685.PCA9685_REG_LED6_OFF_H
    REG_LED7_ON_L = _pyupm_pca9685.PCA9685_REG_LED7_ON_L
    REG_LED7_ON_H = _pyupm_pca9685.PCA9685_REG_LED7_ON_H
    REG_LED7_OFF_L = _pyupm_pca9685.PCA9685_REG_LED7_OFF_L
    REG_LED7_OFF_H = _pyupm_pca9685.PCA9685_REG_LED7_OFF_H
    REG_LED8_ON_L = _pyupm_pca9685.PCA9685_REG_LED8_ON_L
    REG_LED8_ON_H = _pyupm_pca9685.PCA9685_REG_LED8_ON_H
    REG_LED8_OFF_L = _pyupm_pca9685.PCA9685_REG_LED8_OFF_L
    REG_LED8_OFF_H = _pyupm_pca9685.PCA9685_REG_LED8_OFF_H
    REG_LED9_ON_L = _pyupm_pca9685.PCA9685_REG_LED9_ON_L
    REG_LED9_ON_H = _pyupm_pca9685.PCA9685_REG_LED9_ON_H
    REG_LED9_OFF_L = _pyupm_pca9685.PCA9685_REG_LED9_OFF_L
    REG_LED9_OFF_H = _pyupm_pca9685.PCA9685_REG_LED9_OFF_H
    REG_LED10_ON_L = _pyupm_pca9685.PCA9685_REG_LED10_ON_L
    REG_LED10_ON_H = _pyupm_pca9685.PCA9685_REG_LED10_ON_H
    REG_LED10_OFF_L = _pyupm_pca9685.PCA9685_REG_LED10_OFF_L
    REG_LED10_OFF_H = _pyupm_pca9685.PCA9685_REG_LED10_OFF_H
    REG_LED11_ON_L = _pyupm_pca9685.PCA9685_REG_LED11_ON_L
    REG_LED11_ON_H = _pyupm_pca9685.PCA9685_REG_LED11_ON_H
    REG_LED11_OFF_L = _pyupm_pca9685.PCA9685_REG_LED11_OFF_L
    REG_LED11_OFF_H = _pyupm_pca9685.PCA9685_REG_LED11_OFF_H
    REG_LED12_ON_L = _pyupm_pca9685.PCA9685_REG_LED12_ON_L
    REG_LED12_ON_H = _pyupm_pca9685.PCA9685_REG_LED12_ON_H
    REG_LED12_OFF_L = _pyupm_pca9685.PCA9685_REG_LED12_OFF_L
    REG_LED12_OFF_H = _pyupm_pca9685.PCA9685_REG_LED12_OFF_H
    REG_LED13_ON_L = _pyupm_pca9685.PCA9685_REG_LED13_ON_L
    REG_LED13_ON_H = _pyupm_pca9685.PCA9685_REG_LED13_ON_H
    REG_LED13_OFF_L = _pyupm_pca9685.PCA9685_REG_LED13_OFF_L
    REG_LED13_OFF_H = _pyupm_pca9685.PCA9685_REG_LED13_OFF_H
    REG_LED14_ON_L = _pyupm_pca9685.PCA9685_REG_LED14_ON_L
    REG_LED14_ON_H = _pyupm_pca9685.PCA9685_REG_LED14_ON_H
    REG_LED14_OFF_L = _pyupm_pca9685.PCA9685_REG_LED14_OFF_L
    REG_LED14_OFF_H = _pyupm_pca9685.PCA9685_REG_LED14_OFF_H
    REG_LED15_ON_L = _pyupm_pca9685.PCA9685_REG_LED15_ON_L
    REG_LED15_ON_H = _pyupm_pca9685.PCA9685_REG_LED15_ON_H
    REG_LED15_OFF_L = _pyupm_pca9685.PCA9685_REG_LED15_OFF_L
    REG_LED15_OFF_H = _pyupm_pca9685.PCA9685_REG_LED15_OFF_H
    REG_ALL_LED_ON_L = _pyupm_pca9685.PCA9685_REG_ALL_LED_ON_L
    REG_ALL_LED_ON_H = _pyupm_pca9685.PCA9685_REG_ALL_LED_ON_H
    REG_ALL_LED_OFF_L = _pyupm_pca9685.PCA9685_REG_ALL_LED_OFF_L
    REG_ALL_LED_OFF_H = _pyupm_pca9685.PCA9685_REG_ALL_LED_OFF_H
    REG_PRESCALE = _pyupm_pca9685.PCA9685_REG_PRESCALE
    REG_TESTMODE = _pyupm_pca9685.PCA9685_REG_TESTMODE
    MODE1_ALL_CALL = _pyupm_pca9685.PCA9685_MODE1_ALL_CALL
    MODE1_SUB3 = _pyupm_pca9685.PCA9685_MODE1_SUB3
    MODE1_SUB2 = _pyupm_pca9685.PCA9685_MODE1_SUB2
    MODE1_SUB1 = _pyupm_pca9685.PCA9685_MODE1_SUB1
    MODE1_SLEEP = _pyupm_pca9685.PCA9685_MODE1_SLEEP
    MODE1_AI = _pyupm_pca9685.PCA9685_MODE1_AI
    MODE1_EXTCLK = _pyupm_pca9685.PCA9685_MODE1_EXTCLK
    MODE1_RESTART = _pyupm_pca9685.PCA9685_MODE1_RESTART
    MODE2_OUTNE0 = _pyupm_pca9685.PCA9685_MODE2_OUTNE0
    MODE2_OUTNE = _pyupm_pca9685.PCA9685_MODE2_OUTNE
    MODE2_OUTDRV = _pyupm_pca9685.PCA9685_MODE2_OUTDRV
    MODE2_OCH = _pyupm_pca9685.PCA9685_MODE2_OCH
    MODE2_INVRT = _pyupm_pca9685.PCA9685_MODE2_INVRT
    MODE2_RESERVE0 = _pyupm_pca9685.PCA9685_MODE2_RESERVE0
    MODE2_RESERVE1 = _pyupm_pca9685.PCA9685_MODE2_RESERVE1
    MODE2_RESERVE2 = _pyupm_pca9685.PCA9685_MODE2_RESERVE2

    def __init__(self, *args):
        _pyupm_pca9685.PCA9685_swiginit(self, _pyupm_pca9685.new_PCA9685(*args))
    __swig_destroy__ = _pyupm_pca9685.delete_PCA9685

    def writeByte(self, reg, byte):
        return _pyupm_pca9685.PCA9685_writeByte(self, reg, byte)

    def writeWord(self, reg, word):
        return _pyupm_pca9685.PCA9685_writeWord(self, reg, word)

    def readByte(self, reg):
        return _pyupm_pca9685.PCA9685_readByte(self, reg)

    def readWord(self, reg):
        return _pyupm_pca9685.PCA9685_readWord(self, reg)

    def setModeSleep(self, sleep):
        return _pyupm_pca9685.PCA9685_setModeSleep(self, sleep)

    def ledFullOn(self, led, val):
        return _pyupm_pca9685.PCA9685_ledFullOn(self, led, val)

    def ledFullOff(self, led, val):
        return _pyupm_pca9685.PCA9685_ledFullOff(self, led, val)

    def ledOnTime(self, led, time):
        return _pyupm_pca9685.PCA9685_ledOnTime(self, led, time)

    def ledOffTime(self, led, time):
        return _pyupm_pca9685.PCA9685_ledOffTime(self, led, time)

    def setPrescale(self, prescale):
        return _pyupm_pca9685.PCA9685_setPrescale(self, prescale)

    def setPrescaleFromHz(self, hz, oscFreq=25000000.0):
        return _pyupm_pca9685.PCA9685_setPrescaleFromHz(self, hz, oscFreq)

    def enableRestart(self, enabled):
        return _pyupm_pca9685.PCA9685_enableRestart(self, enabled)

# Register PCA9685 in _pyupm_pca9685:
_pyupm_pca9685.PCA9685_swigregister(PCA9685)



