# 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_pn532
else:
    import _pyupm_pn532

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_pn532.getVersion()
class uint8Array(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, nelements):
        _pyupm_pn532.uint8Array_swiginit(self, _pyupm_pn532.new_uint8Array(nelements))
    __swig_destroy__ = _pyupm_pn532.delete_uint8Array

    def __getitem__(self, index):
        return _pyupm_pn532.uint8Array___getitem__(self, index)

    def __setitem__(self, index, value):
        return _pyupm_pn532.uint8Array___setitem__(self, index, value)

    def cast(self):
        return _pyupm_pn532.uint8Array_cast(self)

    @staticmethod
    def frompointer(t):
        return _pyupm_pn532.uint8Array_frompointer(t)

# Register uint8Array in _pyupm_pn532:
_pyupm_pn532.uint8Array_swigregister(uint8Array)

def uint8Array_frompointer(t):
    return _pyupm_pn532.uint8Array_frompointer(t)

PN532_I2C_BUS = _pyupm_pn532.PN532_I2C_BUS
PN532_DEFAULT_I2C_ADDR = _pyupm_pn532.PN532_DEFAULT_I2C_ADDR
PN532_PREAMBLE = _pyupm_pn532.PN532_PREAMBLE
PN532_STARTCODE1 = _pyupm_pn532.PN532_STARTCODE1
PN532_STARTCODE2 = _pyupm_pn532.PN532_STARTCODE2
PN532_POSTAMBLE = _pyupm_pn532.PN532_POSTAMBLE
PN532_HOSTTOPN532 = _pyupm_pn532.PN532_HOSTTOPN532
PN532_PN532TOHOST = _pyupm_pn532.PN532_PN532TOHOST
class PN532(object):
    thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
    __repr__ = _swig_repr
    CMD_DIAGNOSE = _pyupm_pn532.PN532_CMD_DIAGNOSE
    CMD_GETFIRMWAREVERSION = _pyupm_pn532.PN532_CMD_GETFIRMWAREVERSION
    CMD_GETGENERALSTATUS = _pyupm_pn532.PN532_CMD_GETGENERALSTATUS
    CMD_READREGISTER = _pyupm_pn532.PN532_CMD_READREGISTER
    CMD_WRITEREGISTER = _pyupm_pn532.PN532_CMD_WRITEREGISTER
    CMD_READGPIO = _pyupm_pn532.PN532_CMD_READGPIO
    CMD_WRITEGPIO = _pyupm_pn532.PN532_CMD_WRITEGPIO
    CMD_SETSERIALBAUDRATE = _pyupm_pn532.PN532_CMD_SETSERIALBAUDRATE
    CMD_SETPARAMETERS = _pyupm_pn532.PN532_CMD_SETPARAMETERS
    CMD_SAMCONFIGURATION = _pyupm_pn532.PN532_CMD_SAMCONFIGURATION
    CMD_POWERDOWN = _pyupm_pn532.PN532_CMD_POWERDOWN
    CMD_RFCONFIGURATION = _pyupm_pn532.PN532_CMD_RFCONFIGURATION
    CMD_RFREGULATIONTEST = _pyupm_pn532.PN532_CMD_RFREGULATIONTEST
    CMD_INJUMPFORDEP = _pyupm_pn532.PN532_CMD_INJUMPFORDEP
    CMD_INJUMPFORPSL = _pyupm_pn532.PN532_CMD_INJUMPFORPSL
    CMD_INLISTPASSIVETARGET = _pyupm_pn532.PN532_CMD_INLISTPASSIVETARGET
    CMD_INATR = _pyupm_pn532.PN532_CMD_INATR
    CMD_INPSL = _pyupm_pn532.PN532_CMD_INPSL
    CMD_INDATAEXCHANGE = _pyupm_pn532.PN532_CMD_INDATAEXCHANGE
    CMD_INCOMMUNICATETHRU = _pyupm_pn532.PN532_CMD_INCOMMUNICATETHRU
    CMD_INDESELECT = _pyupm_pn532.PN532_CMD_INDESELECT
    CMD_INRELEASE = _pyupm_pn532.PN532_CMD_INRELEASE
    CMD_INSELECT = _pyupm_pn532.PN532_CMD_INSELECT
    CMD_INAUTOPOLL = _pyupm_pn532.PN532_CMD_INAUTOPOLL
    CMD_TGINITASTARGET = _pyupm_pn532.PN532_CMD_TGINITASTARGET
    CMD_TGSETGENERALBYTES = _pyupm_pn532.PN532_CMD_TGSETGENERALBYTES
    CMD_TGGETDATA = _pyupm_pn532.PN532_CMD_TGGETDATA
    CMD_TGSETDATA = _pyupm_pn532.PN532_CMD_TGSETDATA
    CMD_TGSETMETADATA = _pyupm_pn532.PN532_CMD_TGSETMETADATA
    CMD_TGGETINITIATORCOMMAND = _pyupm_pn532.PN532_CMD_TGGETINITIATORCOMMAND
    CMD_TGRESPONSETOINITIATOR = _pyupm_pn532.PN532_CMD_TGRESPONSETOINITIATOR
    CMD_TGGETTARGETSTATUS = _pyupm_pn532.PN532_CMD_TGGETTARGETSTATUS
    RSP_INDATAEXCHANGE = _pyupm_pn532.PN532_RSP_INDATAEXCHANGE
    RSP_INLISTPASSIVETARGET = _pyupm_pn532.PN532_RSP_INLISTPASSIVETARGET
    MIFARE_CMD_AUTH_A = _pyupm_pn532.PN532_MIFARE_CMD_AUTH_A
    MIFARE_CMD_AUTH_B = _pyupm_pn532.PN532_MIFARE_CMD_AUTH_B
    MIFARE_CMD_READ = _pyupm_pn532.PN532_MIFARE_CMD_READ
    MIFARE_CMD_WRITE = _pyupm_pn532.PN532_MIFARE_CMD_WRITE
    MIFARE_CMD_TRANSFER = _pyupm_pn532.PN532_MIFARE_CMD_TRANSFER
    MIFARE_CMD_DECREMENT = _pyupm_pn532.PN532_MIFARE_CMD_DECREMENT
    MIFARE_CMD_INCREMENT = _pyupm_pn532.PN532_MIFARE_CMD_INCREMENT
    MIFARE_CMD_STORE = _pyupm_pn532.PN532_MIFARE_CMD_STORE
    MIFARE_ULTRALIGHT_CMD_WRITE = _pyupm_pn532.PN532_MIFARE_ULTRALIGHT_CMD_WRITE
    NDEF_URIPREFIX_NONE = _pyupm_pn532.PN532_NDEF_URIPREFIX_NONE
    NDEF_URIPREFIX_HTTP_WWWDOT = _pyupm_pn532.PN532_NDEF_URIPREFIX_HTTP_WWWDOT
    NDEF_URIPREFIX_HTTPS_WWWDOT = _pyupm_pn532.PN532_NDEF_URIPREFIX_HTTPS_WWWDOT
    NDEF_URIPREFIX_HTTP = _pyupm_pn532.PN532_NDEF_URIPREFIX_HTTP
    NDEF_URIPREFIX_HTTPS = _pyupm_pn532.PN532_NDEF_URIPREFIX_HTTPS
    NDEF_URIPREFIX_TEL = _pyupm_pn532.PN532_NDEF_URIPREFIX_TEL
    NDEF_URIPREFIX_MAILTO = _pyupm_pn532.PN532_NDEF_URIPREFIX_MAILTO
    NDEF_URIPREFIX_FTP_ANONAT = _pyupm_pn532.PN532_NDEF_URIPREFIX_FTP_ANONAT
    NDEF_URIPREFIX_FTP_FTPDOT = _pyupm_pn532.PN532_NDEF_URIPREFIX_FTP_FTPDOT
    NDEF_URIPREFIX_FTPS = _pyupm_pn532.PN532_NDEF_URIPREFIX_FTPS
    NDEF_URIPREFIX_SFTP = _pyupm_pn532.PN532_NDEF_URIPREFIX_SFTP
    NDEF_URIPREFIX_SMB = _pyupm_pn532.PN532_NDEF_URIPREFIX_SMB
    NDEF_URIPREFIX_NFS = _pyupm_pn532.PN532_NDEF_URIPREFIX_NFS
    NDEF_URIPREFIX_FTP = _pyupm_pn532.PN532_NDEF_URIPREFIX_FTP
    NDEF_URIPREFIX_DAV = _pyupm_pn532.PN532_NDEF_URIPREFIX_DAV
    NDEF_URIPREFIX_NEWS = _pyupm_pn532.PN532_NDEF_URIPREFIX_NEWS
    NDEF_URIPREFIX_TELNET = _pyupm_pn532.PN532_NDEF_URIPREFIX_TELNET
    NDEF_URIPREFIX_IMAP = _pyupm_pn532.PN532_NDEF_URIPREFIX_IMAP
    NDEF_URIPREFIX_RTSP = _pyupm_pn532.PN532_NDEF_URIPREFIX_RTSP
    NDEF_URIPREFIX_URN = _pyupm_pn532.PN532_NDEF_URIPREFIX_URN
    NDEF_URIPREFIX_POP = _pyupm_pn532.PN532_NDEF_URIPREFIX_POP
    NDEF_URIPREFIX_SIP = _pyupm_pn532.PN532_NDEF_URIPREFIX_SIP
    NDEF_URIPREFIX_SIPS = _pyupm_pn532.PN532_NDEF_URIPREFIX_SIPS
    NDEF_URIPREFIX_TFTP = _pyupm_pn532.PN532_NDEF_URIPREFIX_TFTP
    NDEF_URIPREFIX_BTSPP = _pyupm_pn532.PN532_NDEF_URIPREFIX_BTSPP
    NDEF_URIPREFIX_BTL2CAP = _pyupm_pn532.PN532_NDEF_URIPREFIX_BTL2CAP
    NDEF_URIPREFIX_BTGOEP = _pyupm_pn532.PN532_NDEF_URIPREFIX_BTGOEP
    NDEF_URIPREFIX_TCPOBEX = _pyupm_pn532.PN532_NDEF_URIPREFIX_TCPOBEX
    NDEF_URIPREFIX_IRDAOBEX = _pyupm_pn532.PN532_NDEF_URIPREFIX_IRDAOBEX
    NDEF_URIPREFIX_FILE = _pyupm_pn532.PN532_NDEF_URIPREFIX_FILE
    NDEF_URIPREFIX_URN_EPC_ID = _pyupm_pn532.PN532_NDEF_URIPREFIX_URN_EPC_ID
    NDEF_URIPREFIX_URN_EPC_TAG = _pyupm_pn532.PN532_NDEF_URIPREFIX_URN_EPC_TAG
    NDEF_URIPREFIX_URN_EPC_PAT = _pyupm_pn532.PN532_NDEF_URIPREFIX_URN_EPC_PAT
    NDEF_URIPREFIX_URN_EPC_RAW = _pyupm_pn532.PN532_NDEF_URIPREFIX_URN_EPC_RAW
    NDEF_URIPREFIX_URN_EPC = _pyupm_pn532.PN532_NDEF_URIPREFIX_URN_EPC
    NDEF_URIPREFIX_URN_NFC = _pyupm_pn532.PN532_NDEF_URIPREFIX_URN_NFC
    BAUD_MIFARE_ISO14443A = _pyupm_pn532.PN532_BAUD_MIFARE_ISO14443A
    TAG_TYPE_UNKNOWN = _pyupm_pn532.PN532_TAG_TYPE_UNKNOWN
    TAG_TYPE_MIFARE_CLASSIC = _pyupm_pn532.PN532_TAG_TYPE_MIFARE_CLASSIC
    TAG_TYPE_NFC2 = _pyupm_pn532.PN532_TAG_TYPE_NFC2

    def __init__(self, *args):
        _pyupm_pn532.PN532_swiginit(self, _pyupm_pn532.new_PN532(*args))
    __swig_destroy__ = _pyupm_pn532.delete_PN532

    def init(self):
        return _pyupm_pn532.PN532_init(self)

    def getFirmwareVersion(self):
        return _pyupm_pn532.PN532_getFirmwareVersion(self)

    def sendCommandCheckAck(self, cmd, cmdlen, timeout=1000):
        return _pyupm_pn532.PN532_sendCommandCheckAck(self, cmd, cmdlen, timeout)

    def SAMConfig(self):
        return _pyupm_pn532.PN532_SAMConfig(self)

    def setPassiveActivationRetries(self, maxRetries):
        return _pyupm_pn532.PN532_setPassiveActivationRetries(self, maxRetries)

    def readPassiveTargetID(self, cardbaudrate, uid, uidLength, timeout):
        return _pyupm_pn532.PN532_readPassiveTargetID(self, cardbaudrate, uid, uidLength, timeout)

    def inDataExchange(self, send, sendLength, response, responseLength):
        return _pyupm_pn532.PN532_inDataExchange(self, send, sendLength, response, responseLength)

    def inListPassiveTarget(self):
        return _pyupm_pn532.PN532_inListPassiveTarget(self)

    def mifareclassic_IsFirstBlock(self, uiBlock):
        return _pyupm_pn532.PN532_mifareclassic_IsFirstBlock(self, uiBlock)

    def mifareclassic_IsTrailerBlock(self, uiBlock):
        return _pyupm_pn532.PN532_mifareclassic_IsTrailerBlock(self, uiBlock)

    def mifareclassic_AuthenticateBlock(self, uid, uidLen, blockNumber, keyNumber, keyData):
        return _pyupm_pn532.PN532_mifareclassic_AuthenticateBlock(self, uid, uidLen, blockNumber, keyNumber, keyData)

    def mifareclassic_ReadDataBlock(self, blockNumber, data):
        return _pyupm_pn532.PN532_mifareclassic_ReadDataBlock(self, blockNumber, data)

    def mifareclassic_WriteDataBlock(self, blockNumber, data):
        return _pyupm_pn532.PN532_mifareclassic_WriteDataBlock(self, blockNumber, data)

    def mifareclassic_FormatNDEF(self):
        return _pyupm_pn532.PN532_mifareclassic_FormatNDEF(self)

    def mifareclassic_WriteNDEFURI(self, sectorNumber, uriIdentifier, url):
        return _pyupm_pn532.PN532_mifareclassic_WriteNDEFURI(self, sectorNumber, uriIdentifier, url)

    def ntag2xx_ReadPage(self, page, buffer):
        return _pyupm_pn532.PN532_ntag2xx_ReadPage(self, page, buffer)

    def ntag2xx_WritePage(self, page, data):
        return _pyupm_pn532.PN532_ntag2xx_WritePage(self, page, data)

    def ntag2xx_WriteNDEFURI(self, uriIdentifier, url, dataLen):
        return _pyupm_pn532.PN532_ntag2xx_WriteNDEFURI(self, uriIdentifier, url, dataLen)

    def getATQA(self):
        return _pyupm_pn532.PN532_getATQA(self)

    def getSAK(self):
        return _pyupm_pn532.PN532_getSAK(self)

    def i2cContext(self):
        return _pyupm_pn532.PN532_i2cContext(self)

    def pn532Debug(self, enable):
        return _pyupm_pn532.PN532_pn532Debug(self, enable)

    def mifareDebug(self, enable):
        return _pyupm_pn532.PN532_mifareDebug(self, enable)

    def tagType(self):
        return _pyupm_pn532.PN532_tagType(self)

# Register PN532 in _pyupm_pn532:
_pyupm_pn532.PN532_swigregister(PN532)



