User Manual

44
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
FileSize: File Size
Return Value
0 if successful; otherwise, Nonzero. Reference Table 1.11
Example
int st;
unsigned char comSetting=0x00;// transmission in the clear
unsigned char accessRights[3]={0x22,0x22};/* Read, write, read / write, modify the
settings are all required to verify the key No. 2 */
unsigned char fsize[4]={0x20,0x00,0x00};// length of 32 bytes
st= fw_createDataFile_desfire(icdev,0x01,comSetting,accessRights,fsize);
int fw_createValueFile_desfire(int icdev,unsigned char fileNo,unsigned char
ComSet,unsigned char* AccessRight,unsigned char* lowerLimit,unsigned char*
upperLimit,unsigned char* value,unsigned char creditEnabled);
Description
Create value file
Parameters
icdev: Value of Device Handle.
fileNo: File ID
comSet: data transmission form:
0: transmission in the clear,
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
lowerLimit: Minimum value
upperLimit: Maximum value
value : the current value
creditEnabled: whether to support limited memory
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 lower[4]={0x00,0x00,0x00,0x00};// Minimum is 0