POC-300 Series
109
memset(&setup, 0, sizeof(setup));
setup.portMask = 0x0f;
// 00001111b, enable ch.0~3
setup.edgeMode = 0x00; // generate interrupt on level change
setup.edgeType = 0x00;
// rising/falling edge, only effective when
edgeMode = 1
if ( ! SetupDICOS(&setup, sizeof(setup)) )
{
printf("SetupDICOS --> FAILED\n");
return -2;
}
printf("SetupDICOS --> PASSED\n");
//Step 3
, register the callback function
if ( ! RegisterCallbackDICOS(callback_function) )
{
printf("RegisterCallbackDICOS --> FAILED\n");
return -3;
}
printf("RegisterCallbackDICOS --> PASSED\n");
//Step 4
, start the DI Change-of-State Interrupt
if ( ! StartDICOS() )
{
printf("StartDICOS --> FAILED\n");
return -4;
}
printf("StartDICOS --> PASSED\n");
printf("\npress any key to stop...\n");
system("pause >nul");
//Step 5
, stop the DI Change-of-State Interrupt operation
if ( ! StopDICOS() )
{
printf("StopDICOS --> FAILED\n");
return -5;
Содержание POC-300
Страница 1: ...Neousys Technology Inc POC 300 Series User Manual Revision 1 0 ...
Страница 4: ...Table of Contents 4 StopDICOS 108 DI COS Example 108 ...
Страница 20: ...POC 300 Series 20 1 5 Dimension 1 5 1 Superior View NOTE All measurements are in millimeters mm ...
Страница 21: ...POC 300 Series 21 1 5 2 Front Panel View NOTE All measurements are in millimeters mm ...
Страница 22: ...POC 300 Series 22 1 5 3 Bottom View NOTE All measurements are in millimeters mm ...
Страница 24: ...POC 300 Series 24 1 6 2 Wall Mount Bracket WM 300V NOTE All measurements are in millimeters mm ...
Страница 25: ...POC 300 Series 25 1 6 3 Wall Mount Bracket WM 300H NOTE All measurements are in millimeters mm ...
Страница 58: ...POC 300 Series 58 5 Reinstall the system enclosure ...
Страница 110: ...POC 300 Series 110 printf StopDICOS PASSED n printf npress any key to exit n system pause nul return 0 ...