User Manual

27
"31323334353637383930616263646566." The same below.
int fw_write(int icdev,unsingned char _Adr,unsigned char *_Data);
Description
Write data to card.
For M1 card :Write one block data(16 bytes) once.
For ML card :Write one page data(4 bytes)once
Parameters
icdev:Value of Device Handle.
_Adr:M1 Card——Address of block M1(0~63),MS70(0-255);
_Data:data for write
Return Value
0 if successful; otherwise, Nonzero.
Example
int st;
unsigned char *data=”1234567890123456”;
st=fw_write(icdev,4,data);//write block 4
Related HEX function:
int fw_write_hex(int icdev,unsingned char _Adr,unsigned char *_Data)
Remark
The second parameter of this function is the block number. For the M1 card, the 4th
block of each sector is the password block; for S70 card, the 4th blocks of the first
32 sectors , and the 16 th block of the last eight sectors, is the password block;
rewriting password block must be carefully, because the sector may damage after the
rewrite operation.
int fw_halt(int icdev)
Description
Abort operation of card.
Parameters
icdev:Value of Device Handle.
Return Value
0 if successful; otherwise, Nonzero.
Example
st=fw_halt(icdev);
Remark
There is a parameter _Mode in function fw_card(),card been setted HALT state
when it is setted value 0,the card should be take out the operating area and put
in again.
int fw_changeb3(int icdev,unsigned char _SecNr,unsigned char *_KeyA, unsigned char
*_CtrlW,unsigned char _Bk,unsigned char *_KeyB);
Description
Update data of block 3(update data of block 15 if card type is S70 and section