
15
0x1b(027)
-
Module communication timeout
0x3c(060)
-
Non-normal operation
0x64(100)
-
Wrong data
0x7c(124)
-
Parameter error
2. API Function
2.1
Common Functions
int
fw_init(int port,long baud);
Description:
Initialize the communication port.
Parameters:
port:COM Type.Serial port 1~100 when set value 0~99. USB port when set value
100(baud rate invalid in this case).
baud:Baud rate(value:9600~115200)
Return:
Return the value of serial port identifier If successful;
Return -1 if unsuccessful
Example:
int icdev,commdev;
icdev=fw_init(100,0);// initialize USB interface
commdev=fw_init(0,9600);// initial
serial
interface, Baud rate:9600
Remark
:
If there are more than one Reader connected to the computer,call this function
can get their handle each.Next is an example:
int icdev1,icdev2,icdev3;/* presume there are three readers connected */
icdev1=fw_init(100,0);/* get the first device handle */
icdev2=fw_init(100,1); /* get the second device handle */
icdev3=fw_init(100,2); /* get the third device handle */
int fw_exit(int icdev);
Description
Close the communication port.
Parameters
icdev:Value of Device Handle.
Return Value
0 if successful; otherwise, Nonzero.
Example
fw_exit(icdev);
Remark
In WIN32 environment, Icdev is the handle of device; It must be released before
next linking.
Содержание E7
Страница 3: ...3 4 Appendix 68 4 1 Table 1 Mifare Plus card personalized structure 68 ...
Страница 5: ...5 ...