45
unsigned char upper[4]={0xff,0xff,0xff,0x00};// Maximum is 0xffffff
unsigned char value[4]={0x32,0x00,0x00,0x00};// Current value is set to 50 (0x32)
unsigned char enable=0x01;// Support limited memory
st=fw_createValueFile_desfire(icdev,0x02,comSetting,accessRights,lower,uppe
r,value,enabled);
int
fw_
createCsyRecord_desfire(int
icdev,unsigned
char
fileNo,unsigned
charcomSet,unsignedchar*AccessRight,unsignedchar*
RecordSize,unsigned
char*
MaxNum);
Description
Create cycle record file
Parameters
icdev: Value of Device Handle.
fileNo: File ID
comSet: data transmission form:
0: Express transmission,
1: MAC code validation,
3: DES/3DES Encryption
accessRight: Access right
accessRight [0] : Low nibble has the right to modify access permissions
High nibble has the right to read / write the file
accessRight [1] : Low nibble has the access to write to the file
High nibble has the access to read the file
RecordSize: the length of each record
MaxNum: the Max number of records
Return Value
0 if successful; otherwise, Nonzero. Reference Table 1.11
Example
int st;
unsigned char comSetting=0x03;//DES Encrypted transmission
unsigned char accessRights[3]={0x22,0x22};/* Read, write, read / write, modify the
settings are required to verify the key No. 2 */
unsigned char recordLen[3]={0x20,0x00,0x00};//each record with 32 bytes
unsigned char number[3]={0x10,0x00,0x00};//the file has 16 records at most
st= fw_createCsyRecord_desfire
(icdev,0x03,comSetting,accessRights,recordLen,number);
int fw_delFile_desfire(int icdev,unsigned char fileNo);
Description
Delete File
Parameters
icdev: Value of Device Handle.
fileNo: File ID
Return Value
0 if successful; otherwise, Nonzero. Reference Table 1.11
Example