# 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_m24lr64e
else:
    import _pyupm_m24lr64e

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_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):
    thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
    __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):
        _pyupm_m24lr64e.M24LR64E_swiginit(self, _pyupm_m24lr64e.new_M24LR64E(*args))
    __swig_destroy__ = _pyupm_m24lr64e.delete_M24LR64E

    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)

# Register M24LR64E in _pyupm_m24lr64e:
_pyupm_m24lr64e.M24LR64E_swigregister(M24LR64E)



