Description of functions
AN3954
14/47
Doc ID022016 Rev 4
printf("\n\n\n\n");
iresult= CR95HFDll_Echo (strAnswer);
printf("\nEcho using CR95HFDll_Echo function:\n");
printf("\n --> request : CR95HFDll_Echo(strAnswer)");
printf("\n <-- answer : ");
if (iresult == 0)
printf("%s = Echo command answer\n\n\r", strAnswer);
else
printf("%s = No answer from MCU\n\n\r", strAnswer);
printf("\n\n\n\n");
printf("\npress any key to continue");
printf("\n");
scanf("%s", &entry3);
return iresult;
}
2.2.2 CR95HFDLL_getMCUrev
This function sends a USB request to the STM32 MCU on the CR95HF demonstration
board that sends back the revision number of its firmware.
Visual Basic language
Declaration
:
Public Declare Function CR95HFDLL_getMCUrev Lib
"CR95HF.dll" (ByVal mystring As String) As Long
Prototype
:
status = CR95HFDLL_getMCUrev(strAnswer)
Input parameter
:
None
Output parameter
:
strAnswer: Firmware revision of the STM32 MCU on CR95HF
demonstration board.
Answer example: “0003010300”
Where:
00: Status byte (see
03: Size of answer (in bytes)
010300: Revision 1.3.0
Returned value
:
lngStatus:
0: No error
5: CR95HF demonstration board not connected
Source code example
Private Sub cmdGetMCURev_Click()
Dim strAnswer As String * 256
Dim lngStatus As Long
lngStatus = CR95HFDLL_getMCUrev(strAnswer)
If (lngStatus = 0) Then
txtMCUrev.Text = strAnswer