From ba06dadf7b441eeba4c1164072e728bb53ac890c Mon Sep 17 00:00:00 2001 From: Frank Mori Hess Date: Sun, 21 Mar 2004 17:10:05 +0000 Subject: [PATCH] don't force various bits in cb_mask when command is executed, and automaticaly set TRIG_WAKE_EOS if they are calling back on end of scan events --- comedi/kcomedilib/get.c | 2 +- comedi/kcomedilib/kcomedilib_main.c | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/comedi/kcomedilib/get.c b/comedi/kcomedilib/get.c index 2290c33f..1f79ca50 100644 --- a/comedi/kcomedilib/get.c +++ b/comedi/kcomedilib/get.c @@ -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; diff --git a/comedi/kcomedilib/kcomedilib_main.c b/comedi/kcomedilib/kcomedilib_main.c index 98fa98ed..01c19629 100644 --- a/comedi/kcomedilib/kcomedilib_main.c +++ b/comedi/kcomedilib/kcomedilib_main.c @@ -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; -- 2.26.2