don't force various bits in cb_mask when command is executed, and
authorFrank Mori Hess <fmhess@speakeasy.net>
Sun, 21 Mar 2004 17:10:05 +0000 (17:10 +0000)
committerFrank Mori Hess <fmhess@speakeasy.net>
Sun, 21 Mar 2004 17:10:05 +0000 (17:10 +0000)
automaticaly set TRIG_WAKE_EOS if they are calling back on end of
scan events

comedi/kcomedilib/get.c
comedi/kcomedilib/kcomedilib_main.c

index 2290c33fe6e11af656fed1eadc543f2fcdc3369d..1f79ca50a4235fae550397118c2826f3060d88a3 100644 (file)
@@ -190,7 +190,7 @@ int comedi_get_buffer_contents( comedi_t *d, unsigned int subdevice )
 
        if( subdevice >= dev->n_subdevices ) return -1;
        async = s->async;
-
+       if(async == NULL) return 0;
        num_bytes = comedi_buf_read_n_available(s);
        comedi_buf_munge( dev, s, async->buf_write_count - async->munge_count );
        return num_bytes;
index 98fa98ed747eb53070c161d5c0b62dcbfd6d6776..01c19629d76ea3cb5073f99f956299eb7493872f 100644 (file)
@@ -150,7 +150,8 @@ int comedi_command(comedi_t *d,comedi_cmd *cmd)
        if(async == NULL)
                return -ENODEV;
 
-       async->cb_mask |= COMEDI_CB_EOA|COMEDI_CB_BLOCK|COMEDI_CB_ERROR;
+       if(async->cb_mask & COMEDI_CB_EOS)
+               cmd->flags |= TRIG_WAKE_EOS;
 
        async->cmd=*cmd;