Forum Discussion
Altera_Forum
Honored Contributor
15 years agoin the code there r instructions like
main() { signal(SIGPIPE,SIG_IGN); int fp,oflags; signal(SIGIO, interrupt_handler); fp = open("/dev/interrupt1", O_NOCTTY); if(fp < 0) { printf("Error opening device node !\n"); } else { fcntl(fp, F_SETOWN, getpid()); oflags = fcntl(fp, F_GETFL); fcntl(fp, F_SETFL, oflags | FASYNC); } }///end of main function interrupt_handler() { \\control should come here when edge is detected }