📄 modmfrc500.bas
字号:
Attribute VB_Name = "modMfRC500"
'
' Copyright (c), Philips Semiconductors Gratkorn ' Austria
'
' (C)PHILIPS Electronics N.V.2000
' All rights are reserved. Reproduction in whole or in part is
' prohibited without the written consent of the copyright owner.
' Philips reserves the right to make changes without notice at any time.
' Philips makes no warranty, expressed, implied or statutory, including but
' not limited to any implied warranty of merchantability or fitness for any
'particular purpose, or that the use will not infringe any third party patent,
' copyright or trademark. Philips must not be liable for any loss or damage
' arising from its use.
'
' General Include File for serveral defines concerning conditional library
' compilation and microcontroller usage
' define function prefix for convinience
' _____________________________________________________________________________
' Function Prototypes
' _____________________________________________________________________________
' _____________________________________________________________________________
' Global Variable Declaration
' _____________________________________________________________________________
' _____________________________________________________________________________
'
' FUNCTION: Mf500LibInfo
' IN: unsigned long key
' OUT: -
' RETURN: const char * *VERSION returns char *
' *BUILD returns unsigned long
' NULL on error
' COMMENT:
'
Declare Function Mf500LibInfo Lib "MfRc500.dll" Alias "_Mf500LibInfo@4" (ByVal key As Long) As Long
' ____________________________________________________________________________
'
' FUNCTION: Mf500InterfaceOpen
' IN: unsigned long mode
' IN: unsigned long options
' OUT: -
' RETURN: RET_STATUS MI_POLLING interface opened
' MI_WRONG_PARAMETER_VALUE invalid mode and'or options
' MI_INTERFACE_ERROR error while opening interface
' COMMENT: Necessary for MfGeneric compatibility.
' Constructs the internal used InterfaceHandle and ReaderInterface
' object instances using the options given in mode and options.
'
Declare Function Mf500InterfaceOpen% Lib "MfRc500.dll" Alias "_Mf500InterfaceOpen@8" (ByVal mode&, ByVal options&)
' _____________________________________________________________________________
'
' FUNCTION: Mf500InterfaceClose
' IN: -
' OUT: -
' RETURN: MI_OK
' COMMENT: Necessary for MfGeneric compatibility.
' Deletes the internal used InterfaceHandle and ReaderInterface
' object instances.
'
Declare Function Mf500InterfaceClose% Lib "MfRc500.dll" Alias "_Mf500InterfaceClose@0" ()
' PCD Configuration
Declare Function Mf500PcdConfig Lib "MfRc500.dll" Alias "_Mf500PcdConfig@0" () As Integer
' Active Antenna Slave Configuration of the MF RC500.
'Declare Function Mf500ActiveAntennaSlaveConfig Lib "MfRc500.dll" () As Integer
' Active Antenna Master Configuration of the MF RC 500
'Declare Function Mf500ActiveAntennaMasterConfig Lib "MfRc500.dll" () As Integer
' Set default attributes for the baudrate divider
Declare Function Mf500PcdSetDefaultAttrib Lib "MfRc500.dll" Alias "_Mf500PcdSetDefaultAttrib@0" () As Integer
' Set attributes for the baudrate divider
Declare Function Mf500PcdSetAttrib Lib "MfRc500.dll" Alias "_Mf500PcdSetAttrib@8" (ByVal DSI As Byte, ByVal DRI As Byte) As Integer
' Get transmission properties of the PCD
Declare Function Mf500PcdGetAttrib Lib "MfRc500.dll" Alias "_Mf500PcdGetAttrib@20" _
(ByRef FSCImax As Byte, ByRef FSDImax As Byte, ByRef DSsupp As Byte, ByRef DRsupp As Byte, ByRef DREQDS As Byte) As Integer
' PICC Request command
Declare Function Mf500PiccRequest Lib "MfRc500.dll" Alias "_Mf500PiccRequest@8" _
(ByVal req_code As Byte, ByRef atq As Byte) As Integer
' PICC Request command for ISO 14443 A-4 Command set
Declare Function Mf500PiccCommonRequest Lib "MfRc500.dll" Alias "_Mf500PiccCommonRequest@8" _
(ByVal req_code As Byte, ByRef atq As Byte) As Integer
' PICC Anticollision Command
Declare Function Mf500PiccAnticoll Lib "MfRc500.dll" Alias "_Mf500PiccAnticoll@8" _
(ByVal Bcnt As Byte, ByRef snr As Byte) As Integer
' PICC Cascaded Anticollision Command
Declare Function Mf500PiccCascAnticoll Lib "MfRc500.dll" Alias "_Mf500PiccCascAnticoll@12" _
(ByVal select_code As Byte, ByVal Bcnt As Byte, ByRef snr As Byte) As Integer
' PICC Select Command
Declare Function Mf500PiccSelect Lib "MfRc500.dll" Alias "_Mf500PiccSelect@8" _
(ByRef snr As Byte, ByRef sak As Byte) As Integer
' PICC Select Command
Declare Function Mf500PiccCascSelect Lib "MfRc500.dll" Alias "_Mf500PiccCascSelect@12" _
(ByVal select_code As Byte, ByRef snr As Byte, ByRef sak As Byte) As Integer
' Activation of a PICC in IDLE mode
Declare Function Mf500PiccActivateIdle Lib "MfRc500.dll" Alias "_Mf500PiccActivateIdle@20" _
(ByVal br As Byte, atq As Byte, sak As Byte, uid As Byte, uid_len As Byte) As Integer
' Activation of a PICC in IDLE mode within a loop function
Declare Function Mf500PiccActivateIdleLoop Lib "MfRc500.dll" Alias "_Mf500PiccActivateIdleLoop@24" _
(ByVal br As Byte, ByRef atq As Byte, ByRef sak As Byte, ByRef uid As Byte, ByRef uid_len, ByVal sec As Byte) As Integer
' Activation of all PICC's in the RF field
Declare Function Mf500PiccActivateWakeup Lib "MfRc500.dll" Alias "_Mf500PiccActivateWakeup@20" _
(ByVal br As Byte, ByRef atq As Byte, ByRef sak As Byte, ByRef uid As Byte, ByVal uid_len) As Integer
' MIFARE
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -