# This file was automatically generated by SWIG (http://www.swig.org).
# Version 3.0.12
#
# 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):
    def swig_import_helper():
        import importlib
        pkg = __name__.rpartition('.')[0]
        mname = '.'.join((pkg, '_pyupm_pca9685')).lstrip('.')
        try:
            return importlib.import_module(mname)
        except ImportError:
            return importlib.import_module('_pyupm_pca9685')
    _pyupm_pca9685 = swig_import_helper()
    del swig_import_helper
elif _swig_python_version_info >= (2, 6, 0):
    def swig_import_helper():
        from os.path import dirname
        import imp
        fp = None
        try:
            fp, pathname, description = imp.find_module('_pyupm_pca9685', [dirname(__file__)])
        except ImportError:
            import _pyupm_pca9685
            return _pyupm_pca9685
        try:
            _mod = imp.load_module('_pyupm_pca9685', fp, pathname, description)
        finally:
            if fp is not None:
                fp.close()
        return _mod
    _pyupm_pca9685 = swig_import_helper()
    del swig_import_helper
else:
    import _pyupm_pca9685
del _swig_python_version_info

try:
    _swig_property = property
except NameError:
    pass  # Python < 2.2 doesn't have 'property'.

try:
    import builtins as __builtin__
except ImportError:
    import __builtin__

def _swig_setattr_nondynamic(self, class_type, name, value, static=1):
    if (name == "thisown"):
        return self.this.own(value)
    if (name == "this"):
        if type(value).__name__ == 'SwigPyObject':
            self.__dict__[name] = value
            return
    method = class_type.__swig_setmethods__.get(name, None)
    if method:
        return method(self, value)
    if (not static):
        if _newclass:
            object.__setattr__(self, name, value)
        else:
            self.__dict__[name] = value
    else:
        raise AttributeError("You cannot add attributes to %s" % self)


def _swig_setattr(self, class_type, name, value):
    return _swig_setattr_nondynamic(self, class_type, name, value, 0)


def _swig_getattr(self, class_type, name):
    if (name == "thisown"):
        return self.this.own()
    method = class_type.__swig_getmethods__.get(name, None)
    if method:
        return method(self)
    raise AttributeError("'%s' object has no attribute '%s'" % (class_type.__name__, name))


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

try:
    _object = object
    _newclass = 1
except __builtin__.Exception:
    class _object:
        pass
    _newclass = 0


def getVersion():
    return _pyupm_pca9685.getVersion()
getVersion = _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):
    __swig_setmethods__ = {}
    __setattr__ = lambda self, name, value: _swig_setattr(self, PCA9685, name, value)
    __swig_getmethods__ = {}
    __getattr__ = lambda self, name: _swig_getattr(self, PCA9685, name)
    __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):
        this = _pyupm_pca9685.new_PCA9685(*args)
        try:
            self.this.append(this)
        except __builtin__.Exception:
            self.this = this
    __swig_destroy__ = _pyupm_pca9685.delete_PCA9685
    __del__ = lambda self: None

    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)
PCA9685_swigregister = _pyupm_pca9685.PCA9685_swigregister
PCA9685_swigregister(PCA9685)

# This file is compatible with both classic and new-style classes.


