[prev in list] [next in list] [prev in thread] [next in thread] 

List:       comedi
Subject:    comedi_register_callback fails
From:       John Darrington <jdarrington () customvis ! com>
Date:       2004-05-19 2:59:21
Message-ID: 20040519025921.GA4488 () customvis ! com
[Download RAW message or body]

I'm trying to get an interrupt driven callback using the ni_pcimio driver.

The following code fragment fails in the comedi_register_callback command
It actually segfaults.  What am I doing wrong ? 

int callback(unsigned int i,void *arg);

int module_init()
{
	 dev = comedi_open("/dev/comedi0");
        if ( !dev) {
                printk("comedi_open failed\n");
                return  -1;
        }
                                                                                
        ret = comedi_lock(dev,in_subd);
        if (ret != 0 )
        {
                printk("cannot lock subdevice \n");
                return -1;
        }
                                                                                
        printk("about to register callback comedi_register_callback: %d\n",ret);      \
ret = comedi_register_callback(dev,in_subd,COMEDI_CB_EOS,callback,NULL);        \
printk("comedi_register_callback: %d\n",ret); }

_______________________________________________
comedi mailing list
comedi@comedi.org
https://cvs.comedi.org/cgi-bin/mailman/listinfo/comedi


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic