Description of functions
AN3954
32/47
Doc ID022016 Rev 4
Note:
To perform this RF Field Off command, the STM32 MCU sends a Protocol Select command
with parameters ‘0000’. For more information, refer to the CR95HF transceiver datasheet.
Visual Basic language
Declaration
:
Public Declare Function CR95HFDll_FieldOff Lib
"CR95HF.dll" (ByVal mystring As String) As Long
Prototype
:
Dim lngStatus As Long
Dim strAnswer As String * 256
status = CR95HFDll_FieldOff(strAnswer)
Input parameter
:
None
Output parameter
:
strAnswer: The CR95HF demonstration board sends back an
answer and the RF Field is switched off.
Answer example: “0000”
Where:
“00” is the status byte (see
for error codes)
“00” is the size of the answer
Returned value
:
lngStatus:
0: No error
5: CR95HF demonstration board not connected
Source code example
Private Sub cmdFieldOff_Click()
Dim strAnswer As String * 256
Dim lngStatus As Long
lngStatus = CR95HFDll_FieldOff(strAnswer)
If (lngStatus = 0) Then
txtFieldOffAnswer.Text = strAnswer
Else
txtFieldOffAnswer.Text = "Field Off request not executed"
End If
End Sub
C/C++ language
Declaration
:
__declspec(dllimport) int __stdcall
CR95HFDll_FieldOff(char *StringReply);
Prototype
:
int iresult;
char strAnswer[50]="";
iresult= CR95HFDll_FieldOff (strAnswer);
Input parameter
:
None
Output parameter
:
strAnswer: The CR95HF demonstration board sends back an
answer and the RF Field is switched off.
Answer example: “0000”
Where:
“00” is the status byte (see
for error codes)
“00” is the size of the answer