make end of scan events correct for digital io
authorFrank Mori Hess <fmhess@speakeasy.net>
Tue, 18 Feb 2003 23:44:47 +0000 (23:44 +0000)
committerFrank Mori Hess <fmhess@speakeasy.net>
Tue, 18 Feb 2003 23:44:47 +0000 (23:44 +0000)
comedi/drivers/comedi_fc.c

index b85299e9f877de09801338b8cf88e7c28bf95083..b8e8a95f0da331c3a96783ed913030edee10e0e8 100644 (file)
 
 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 );
 }