Nuvo-4000 Series User’s Manual
Copyright © 2014 Neousys Technology Inc. All Right Reserved.
Page 74 of 76
StopDICOS
Syntax
BOOL StopDICOS(void);
Description
Stop DI Change-of-State interrupt
Parameter
None
Return Value
Returns TRUE if stop procedure successes, FALSE if stop procedure failed.
Usage
BOOL bRet = StopDICOS();
Change-of-State DI Example
#include <stdio.h>
#include <stdlib.h>
#include <windows.h>
#include "WDT_DIO.h"
//Step 0, define a Change-of-State Interrupt callback function
void __stdcall callback_function(COS_INT_CALLBACK_ARG* arg)
{
printf("data=0x%02x, flag=0x%02x, seq=%02d\n",
arg->portData, arg->intrFlag, arg->intrSeq);
}
int main(int argc, char* argv[])
{
//Step 1, initialize DIO library by invoking InitDIO()
if ( ! InitDIO() )
{
printf("InitDIO --> FAILED\n");
return -1;
}
printf("InitDIO --> PASSED\n");
//Step 2, setup Change-of-State Interrupt mask and level/edge mode