Technical description Chapter 9
PA 3110
62
e) Example in C for Windows NT / 95 (synchronous mode)
void main (void)
{
unsigned char b_BoardHandle;
if (Initialisation (&b_BoardHandle) == 0)
{
if (i_PA3110_SetBoardIntRoutineWin32 (b_BoardHandle,PA3110_SYNCHRONOUS_MODE,
sizeof(str_UserStruct),(void **) &ps_GlobalUserStruct,v_InterruptRoutine) == 0)
{
ps_GlobalUserStruct->ui_TimerIntCpt = 0;
if (i_PA3110_InitTimerWatchdog
(b_BoardHandle, PA3110_TIMER,
1000, PA3110_ENABLE) == 0)
{
if (i_PA3110_StartTimerWatchdog (b_BoardHandle) == 0)
{
while (ps_GlobalUserStruct->ui_TimerIntCpt == 0);
printf (“Receive timer interrupt“);
i_PA3110_StopTimerWatchdog (b_BoardHandle);
}
else
{
printf (“Start timer error“);
}
}
else
{
printf (“Init timer error“);
}
i_PA3110_ResetBoardIntRoutine (b_BoardHandle);
}
else
{
printf (“Interrupt routine initialisation error“);
}
i_PA3110_CloseBoardHandle (b_BoardHandle);
}
else
{
printf (“Initialisation error“);
}
}
Summary of Contents for ADDIALOG PA 3110
Page 35: ......