Doc ID022016 Rev 4
35/47
AN3954
Description of functions
46
printf("%s = Reset SPI 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;
}
2.3.6 CR95HFDll_SendIRQPulse
This function must be used when the CR95HF demonstration board is configured in SPI
mode (communication between the STM32 MCU and the CR95HF IC). The interrupt pulse
is sent to the CR95HF IRQ pin.
Visual Basic language
Declaration
:
Public Declare Function CR95HFDll_SendIRQPulse Lib
"CR95HF.dll" (ByVal mystring As String) As Long
Prototype
:
Dim lngStatus As Long
Dim strAnswer As String * 256
lngStatus = CR95HFDll_SendIRQPulse(strAnswer)
Input parameter
:
None
Output parameter
:
strAnswer: The CR95HF demonstration board sends back an
answer if the IRQ pulse
is
correctly sent.
Answer example: “0000”
Where:
“00” is the status byte (see
“00” is the size of the answer
Returned value
:
lngStatus:
0: No error
5: CR95HF demonstration board not connected
Source code example
Private Sub cmdSendIRQPulse_Click()
Dim strAnswer As String * 256
Dim lngStatus As Long
lngStatus = CR95HFDll_SendIRQPulse(strAnswer)
If (lngStatus = 0) Then
txtSendIRQPulseAnswer.Text = strAnswer
Else
txtSendIRQPulseAnswer.Text = "No answer from the CR95HF
demonstration board"
End If
End Sub