E) Example In C For Windows Nt/95/98 (In Synchronous Mode) - Addi-Data ADDINUM CPCI-1500 Technical Description

Digital inputs and outputs for the pci/compactpci bus
Hide thumbs Also See for ADDINUM CPCI-1500:
Table of Contents

Advertisement

Technical description

e) Example in C for Windows NT/95/98 (in synchronous mode)

str_UserStruct * ps_GlobalUserStruct;
void main (void)
{
int
i_ReturnValue;
unsigned char
b_BoardHandle;
if (Initialisation (&b_BoardHandle) == 0)
{
if (i_APCI1500_SetBoardIntRoutineWin32 (b_BoardHandle, APCI1500_SYNCHRONOUS_MODE,
{
i_ReturnValue = i_APCI1500_InitTimerInputClock
printf ("\nTimer input clock initialisation return value = %d", i_ReturnValue);
i_ReturnValue = i_APCI1500_InitTimerCounter1
printf ("\nTimer initialisation return value = %d", i_ReturnValue);
i_ReturnValue = i_APCI1500_StartTimerCounter1
printf ("\nTimer start return value = %d", i_ReturnValue);
do
{
printf ("\nTimer interrupt counter = %d", ps_GlobalUserStruct->b_TimerCounterCpt [0]);
}
while (!kbhit());
getch ();
i_ReturnValue = i_APCI1500_StopTimerCounter1
printf ("\nTimer stop return value = %d", i_ReturnValue);
i_ReturnValue = i_APCI1500_ResetBoardIntRoutine (b_BoardHandle);
printf ("\nReset board interrupt return value = %d", i_ReturnValue);
i_ReturnValue = i_APCI1500_CloseBoardHandle
printf ("\nClose board handle return value = %d", i_ReturnValue);
}
else
{
printf ("\nInterrupt initialisation error");
i_ReturnValue = i_APCI1500_CloseBoardHandle
printf ("\nClose board handle return value = %d", i_ReturnValue);
}
}
else
{
printf ("\nBoard initialisation error");
}
Chapter 10
sizeof (str_UserStruct), (void **) &ps_GlobalUserStruct,
v_InterruptRoutine) == 0)
(b_BoardHandle, APCI1500_1_8_KHZ);
(b_BoardHandle, APCI1500_TIMER, 1UL,
APCI1500_CONTINUOUS, APCI1500_ENABLE);
(b_BoardHandle);
(b_BoardHandle);
(b_BoardHandle);
(b_BoardHandle);
APCI-/CPCI-1500
107

Advertisement

Table of Contents
loading
Need help?

Need help?

Do you have a question about the ADDINUM CPCI-1500 and is the answer not in the manual?

Questions and answers

This manual is also suitable for:

Addinum apci-1500

Table of Contents