Description of functions
AN3954
30/47
Doc ID022016 Rev 4
Example 3: Answer to Idle command = “0000”
Where:
“00” is the status byte (see
“00” is the size of the answer
Returned value
:
iresult:
0: No error
5: CR95HF demonstration board not connected
2: Empty argument error
Source code example
int STCmd_RdReg (void)
{
int iresult;
char strRequest[50]="";
char strAnswer[50]="";
char entry3;
printf("\n\n\n\n");
strcpy(strRequest,"010803620100");
iresult = CR95HFDll_STCmd(strRequest ,strAnswer);
printf("\nRead register using CR95HFDll_STCmd function:\n");
printf("\n --> request : CR95HFDll_STCmd(%s,
strAnswer)",strRequest);
printf("\n <-- answer : ");
if (iresult == 0)
printf("%s = Read Register answer\n\n\r", strAnswer);
else
printf("%s = No answer from CR95HF IC\n\n\r", strAnswer);
printf("\n\n\n\n");
printf("\npress any key to continue");
printf("\n");
scanf("%s", &entry3);
return iresult;
}
int STCmd_ISO15693 (void)
{
char strRequest[50]="";
char strAnswer[50]="";
int iresult;
char entry3;
printf("\n\n\n\n");
strcpy(strRequest,"010202010D");
iresult = CR95HFDll_STCmd(strRequest ,strAnswer);