Doc ID022016 Rev 4
37/47
AN3954
Description of functions
46
This function can be used after an IDLE command to make sure that the answer buffer has
been emptied and avoid receiving an erroneous answer on the next request.
Visual Basic language
Declaration:
Public Declare Function CR95HFDll_Polling_Reading Lib
"CR95HF.dll" (ByVal mystring As String) As Long
Prototype:
Dim strAnswer As String * 256
Dim lngStatus As Long
lngStatus = CR95HFDll_Polling_Reading(strAnswer)
Input parameter:
None
Output parameter
:
CR95HF answer stored in FIFO answer buffer.
Returned value:
lngStatus:
0: No error
5: CR95HF demonstration board not connected
Source code example
Private Sub cmdPollingReading_Click()
Dim strAnswer As String * 256
Dim lngStatus As Long
lngStatus = CR95HFDll_Polling_Reading(strAnswer)
If (lngStatus = 0) Then
txtPollingReadingAnswer.Text = strAnswer
Else
txtPollingReadingAnswer.Text = "No answer from the
CR95HF demonstration board"
End If
End Sub
C/C++ language
Declaration:
__declspec(dllexport) int __stdcall
CR95HFDll_Polling_Reading(char* StringReply);
Prototype
:
int iresult;
char strAnswer[50]="";
iresult = CR95HFDll_Polling_Reading(strAnswer);
Input parameter:
None
Output parameter:
CR95HF answer stored in FIFO answer buffer.
Returned value:
iresult:
0: No error
5: CR95HF demonstration board not connected
Source code example
int Set_Polling_Reading_config (void)
{
int iresult;
char strAnswer[50]="";
char entry3;
printf("\n\n\n\n");
iresult = CR95HFDll_Polling_Reading(strAnswer);
printf("\nSend IRQ Pulse using CR95HFDll_Polling_Reading