APCI-/CPCI-1500 Technical
description Chapter 10
98
b) Example in C
int MoreInitialisation(unsigned char *pb_BoardHandleArray)
{
int
i_NbrOfBoard;
int
i_Cpt;
unsigned char b_SlotNumberArray [8];
#if defined (_Windows) || defined (_WINDOWS) || defined (_WIN32)
i_APCI1500_InitCompiler (DLL_COMPILER_C);
#endif
i_NbrOfBoard = i_PCI1710_CheckAndGetPCISlotNumber (b_SlotNumberArray)
if(i_NbrOfBoard > 0)
{
for (i_Cpt = 0; i_Cpt < i_NbrOfBoard; i_Cpt ++)
{
if (i_APCI1500_SetBoardInformation (b_SlotNumberArray
[
i_Cpt
]
,
&pb_BoardHandleArray [i_Cpt]) != 0)
{
break;
}
}
if (i_Cpt == i_NbrOfBoard)
{
return (i_Cpt); /* Return number of board found */
}
else
{
return (-1);
/* ERROR */
}
}
else
{
return (-1);
/* ERROR */
}
}