Doc ID022016 Rev 4
33/47
AN3954
Description of functions
46
Returned value
:
iresult:
0: No error
5: CR95HF demonstration board not connected
Source code example
int FieldOff (void)
{
int iresult;
char strAnswer[50]="";
char entry3;
printf("\n\n\n\n");
iresult= CR95HFDll_FieldOff (strAnswer);
printf("\nField Off using CR95HFDll_FieldOff function:\n");
printf("\n --> request : CR95HFDll_FieldOff(strAnswer)");
printf("\n <-- answer : ");
if (iresult == 0)
printf("%s = RF Field Off ok\n\n\r", strAnswer);
else
printf("%s = Error : RF Field Off command error\n\n\r",
strAnswer);
printf("\n\n\n\n");
printf("\npress any key to continue");
printf("\n");
scanf("%s", &entry3);
return iresult;
}
2.3.5 CR95HFDll_ResetSPI
This function resets the CR95HF IC in case of a problem. This function only resets the
CR95HF IC and not the STM32 MCU.
Visual Basic language
Declaration
:
Public Declare Function CR95HFDll_ResetSPI Lib
"CR95HF.dll" (ByVal mystring As String) As Long
Prototype
:
Dim lngStatus As Long
Dim strAnswer As String * 256
lngStatus = CR95HFDll_ResetSPI(strAnswer)
Input parameter
:
None
Output parameter
:
strAnswer: The CR95HF demonstration board sends back an
answer if the SPI has been correctly reset.
Answer example: “0000”
Where:
“00” is the status byte (see
“00” is the size of the answer