From 9ebd12816dd154afd93d354c198c363ea7c68fe1 Mon Sep 17 00:00:00 2001 From: Frank Mori Hess Date: Tue, 18 Feb 2003 23:44:47 +0000 Subject: [PATCH] make end of scan events correct for digital io --- comedi/drivers/comedi_fc.c | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/comedi/drivers/comedi_fc.c b/comedi/drivers/comedi_fc.c index b85299e9..b8e8a95f 100644 --- a/comedi/drivers/comedi_fc.c +++ b/comedi/drivers/comedi_fc.c @@ -30,6 +30,17 @@ static inline unsigned int bytes_per_scan( comedi_subdevice *subd ) { + switch( subd->type ) + { + case COMEDI_SUBD_DI: + case COMEDI_SUBD_DO: + case COMEDI_SUBD_DIO: + return subd->async->cmd.chanlist_len / 8; + break; + default: + break; + } + return subd->async->cmd.chanlist_len * bytes_per_sample( subd ); } -- 2.26.2