Description of functions
AN3954
18/47
Doc ID022016 Rev 4
Source code example
int Get_Hardware_rev (void)
{
char strAnswer[50]="";
int iresult;
char entry3;
printf("\n\n\n\n");
iresult = CR95HFDLL_getHardwareVersion(strAnswer);
printf("\nGet Hardware revision using CR95HFDLL_getHardwareVersion
function:\n");
printf("\n --> request : CR95HFDLL_getHardwarerev(strAnswer)");
printf("\n <-- answer : ");
if (iresult == 0)
printf("%s = Hardware revision\n\n\r", strAnswer);
else
printf("%s = Error : no communication with 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.4 CR95HFDLL_getInterfacePinState
This function verifies the communication path between the STM32 MCU and the CR95HF
IC (either SPI or UART).
The STM32 MCU checks which communication configuration is selected on the CR95HF
demonstration board. Two solder bridges are available to select the SPI or UART
configuration. By default, the board is delivered in the SPI configuration.
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: Interface Pin state.
Answer example: “00010X”
Where:
00: Status byte (see