Doc ID022016 Rev 4
39/47
AN3954
Description of functions
46
C/C++ language
Declaration:
__declspec(dllexport) int __stdcall
CR95HFDll_SendNSSPulse(char* StringReply);
Prototype:
int iresult;
char strAnswer[50]="";
iresult = CR95HFDll_SendNSSPulse(strAnswer);
Input parameter:
None
Output parameter
:
strAnswer: The CR95HFdemonstration board sends back an
answer if the NSS pulse
is
correctly sent.
Example of answer: “0000”
where
“00” is the status byte (see Appendix A for error codes)
“00” is the size of the answer
Returned value:
iresult:
0: No error
5: CR95HF demonstration board not connected
Source code example
int Send_NSS_Pulse (void)
{
int iresult;
char strAnswer[50]="";
char entry3;
printf("\n\n\n\n");
iresult = CR95HFDll_SendNSSPulse(strAnswer);
printf("\nSend IRQ Pulse using CR95HFDll_SendNSSPulse function:\n");
printf("\n --> request : CR95HFDll_SendNSSPulse(strAnswer)");
printf("\n <-- answer : ");
if (iresult == 0)
printf("%s = Send NSS pulse successfully\n\n\r", strAnswer);
else
printf("%s = No answer from CR95HF demonstration
board\n\n\r", strAnswer);
printf("\n\n\n\n");
printf("\npress any key to continue");
printf("\n");
scanf("%s", &entry3);
return iresult;
}