# 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_m24lr64e')).lstrip('.')
        try:
            return importlib.import_module(mname)
        except ImportError:
            return importlib.import_module('_pyupm_m24lr64e')
    _pyupm_m24lr64e = 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_m24lr64e', [dirname(__file__)])
        except ImportError:
            import _pyupm_m24lr64e
            return _pyupm_m24lr64e
        try:
            _mod = imp.load_module('_pyupm_m24lr64e', fp, pathname, description)
        finally:
            if fp is not None:
                fp.close()
        return _mod
    _pyupm_m24lr64e = swig_import_helper()
    del swig_import_helper
else:
    import _pyupm_m24lr64e
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_m24lr64e.getVersion()
getVersion = _pyupm_m24lr64e.getVersion
M24LR64E_I2C_BUS = _pyupm_m24lr64e.M24LR64E_I2C_BUS
M24LR64E_DEFAULT_I2C_ADDR = _pyupm_m24lr64e.M24LR64E_DEFAULT_I2C_ADDR
M24LR64E_DEFAULT_I2C_ADDR_E2 = _pyupm_m24lr64e.M24LR64E_DEFAULT_I2C_ADDR_E2
class M24LR64E(_object):
    __swig_setmethods__ = {}
    __setattr__ = lambda self, name, value: _swig_setattr(self, M24LR64E, name, value)
    __swig_getmethods__ = {}
    __getattr__ = lambda self, name: _swig_getattr(self, M24LR64E, name)
    __repr__ = _swig_repr
    EEPROM_I2C_LENGTH = _pyupm_m24lr64e.M24LR64E_EEPROM_I2C_LENGTH
    PASSWORD_LENGTH = _pyupm_m24lr64e.M24LR64E_PASSWORD_LENGTH
    SECTOR_SECURITY_STATUS_BASE_ADDR = _pyupm_m24lr64e.M24LR64E_SECTOR_SECURITY_STATUS_BASE_ADDR
    LOCK_PROTECT_BIT = _pyupm_m24lr64e.M24LR64E_LOCK_PROTECT_BIT
    WRITE_READ_PROTECT_BIT = _pyupm_m24lr64e.M24LR64E_WRITE_READ_PROTECT_BIT
    PASSWORD_CTRL_BIT = _pyupm_m24lr64e.M24LR64E_PASSWORD_CTRL_BIT
    UID_LENGTH = _pyupm_m24lr64e.M24LR64E_UID_LENGTH
    I2C_WRITE_TIME = _pyupm_m24lr64e.M24LR64E_I2C_WRITE_TIME
    I2C_PASSWORD_ADDR = _pyupm_m24lr64e.M24LR64E_I2C_PASSWORD_ADDR
    RF_PASSWORD_1_ADDR = _pyupm_m24lr64e.M24LR64E_RF_PASSWORD_1_ADDR
    RF_PASSWORD_2_ADDR = _pyupm_m24lr64e.M24LR64E_RF_PASSWORD_2_ADDR
    RF_PASSWORD_3_ADDR = _pyupm_m24lr64e.M24LR64E_RF_PASSWORD_3_ADDR
    DSFID_ADDR = _pyupm_m24lr64e.M24LR64E_DSFID_ADDR
    AFI_ADDR = _pyupm_m24lr64e.M24LR64E_AFI_ADDR
    RESV_ADDR = _pyupm_m24lr64e.M24LR64E_RESV_ADDR
    CONFIG_ADDR = _pyupm_m24lr64e.M24LR64E_CONFIG_ADDR
    UID_ADDR = _pyupm_m24lr64e.M24LR64E_UID_ADDR
    MEM_SIZE_ADDR = _pyupm_m24lr64e.M24LR64E_MEM_SIZE_ADDR
    IC_REF_ADDR = _pyupm_m24lr64e.M24LR64E_IC_REF_ADDR
    PROG_COMP_ENERGY_HARVEST_ADDR = _pyupm_m24lr64e.M24LR64E_PROG_COMP_ENERGY_HARVEST_ADDR
    USER_MODE = _pyupm_m24lr64e.M24LR64E_USER_MODE
    ROOT_MODE = _pyupm_m24lr64e.M24LR64E_ROOT_MODE
    Access_1110 = _pyupm_m24lr64e.M24LR64E_Access_1110
    Access_1111 = _pyupm_m24lr64e.M24LR64E_Access_1111
    Access_1100 = _pyupm_m24lr64e.M24LR64E_Access_1100
    Access_0111 = _pyupm_m24lr64e.M24LR64E_Access_0111
    noPasswd = _pyupm_m24lr64e.M24LR64E_noPasswd
    passwd_1 = _pyupm_m24lr64e.M24LR64E_passwd_1
    passwd_2 = _pyupm_m24lr64e.M24LR64E_passwd_2
    passwd_3 = _pyupm_m24lr64e.M24LR64E_passwd_3

    def __init__(self, *args):
        this = _pyupm_m24lr64e.new_M24LR64E(*args)
        try:
            self.this.append(this)
        except __builtin__.Exception:
            self.this = this
    __swig_destroy__ = _pyupm_m24lr64e.delete_M24LR64E
    __del__ = lambda self: None

    def submitPasswd(self, passwd):
        return _pyupm_m24lr64e.M24LR64E_submitPasswd(self, passwd)

    def writePasswd(self, passwd):
        return _pyupm_m24lr64e.M24LR64E_writePasswd(self, passwd)

    def sectorProtectConfig(self, sectorNumber, protectEnable, accessRight, passwd):
        return _pyupm_m24lr64e.M24LR64E_sectorProtectConfig(self, sectorNumber, protectEnable, accessRight, passwd)

    def clearSectorProtect(self):
        return _pyupm_m24lr64e.M24LR64E_clearSectorProtect(self)

    def sectorWriteLockBit(self, sectorNumber, sockEnable):
        return _pyupm_m24lr64e.M24LR64E_sectorWriteLockBit(self, sectorNumber, sockEnable)

    def getDSFID(self):
        return _pyupm_m24lr64e.M24LR64E_getDSFID(self)

    def getAFI(self):
        return _pyupm_m24lr64e.M24LR64E_getAFI(self)

    def getUID(self):
        return _pyupm_m24lr64e.M24LR64E_getUID(self)

    def getMemorySize(self):
        return _pyupm_m24lr64e.M24LR64E_getMemorySize(self)

    def clearMemory(self):
        return _pyupm_m24lr64e.M24LR64E_clearMemory(self)

    def writeByte(self, address, data):
        return _pyupm_m24lr64e.M24LR64E_writeByte(self, address, data)

    def writeBytes(self, address, buffer, len):
        return _pyupm_m24lr64e.M24LR64E_writeBytes(self, address, buffer, len)

    def readByte(self, address):
        return _pyupm_m24lr64e.M24LR64E_readByte(self, address)

    def readBytes(self, address, buffer, len):
        return _pyupm_m24lr64e.M24LR64E_readBytes(self, address, buffer, len)
M24LR64E_swigregister = _pyupm_m24lr64e.M24LR64E_swigregister
M24LR64E_swigregister(M24LR64E)

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


