changes for ni_mio_cs
authorDavid Schleef <ds@schleef.org>
Fri, 5 May 2000 19:23:15 +0000 (19:23 +0000)
committerDavid Schleef <ds@schleef.org>
Fri, 5 May 2000 19:23:15 +0000 (19:23 +0000)
comedi/Config.in
comedi/drivers/Makefile
comedi/drivers/ni_mio_common.c
comedi/drivers/ni_stc.h

index db770625b6eb1dba760e3a17b1f2e8002299d3fd..8e5386e9e17e2eb86d7a0a6c81cffeafa9c498b0 100644 (file)
@@ -46,6 +46,7 @@ fi
 bool 'National Instruments boards' CONFIG_COMEDI_NI
 if [ "$CONFIG_COMEDI_NI" = "y" ];then
        tristate '  AT-MIO E series' CONFIG_COMEDI_NI_ATMIO
+       tristate '  PCMCIA MIO E series' CONFIG_COMEDI_NI_MIO_CS
        if [ "$CONFIG_PCI" = "y" ];then
                tristate '  PCI-MIO E series' CONFIG_COMEDI_NI_PCIMIO
                tristate '  NI PCI-DIO series' CONFIG_COMEDI_NI_PCIDIO
index 6ac327fd333505866a61d979dab47c6eb5dbe500..575cc291fb7a6c0d5d8a7e9f0a3a421c10bbb8d5 100644 (file)
@@ -34,6 +34,7 @@ obj-$(CONFIG_COMEDI_II_PCI20KC)               += ii_pci20kc.o
 obj-$(CONFIG_COMEDI_MULTIQ3)           += multiq3.o
 
 obj-$(CONFIG_COMEDI_NI_ATMIO)          += ni_atmio.o
+obj-$(CONFIG_COMEDI_NI_MIO_CS)         += ni_mio_cs.o
 obj-$(CONFIG_COMEDI_NI_PCIMIO)         += ni_pcimio.o
 obj-$(CONFIG_COMEDI_NI_PCIDIO)         += ni_pcidio.o
 obj-$(CONFIG_COMEDI_MITE)              += mite.o
index 28354750b667899ef7fd29f1a58fe57396fd95b3..83220b35f849901a1e4b64b680d29e5ef25e77b5 100644 (file)
@@ -1246,7 +1246,8 @@ for(i=0;i<it->n_chan;i++){
 
        ni_writew(conf,AO_Configuration);
 
-       if(range&1)data^=0x800;
+       if(range&1)
+               data^=(1<<(boardtype.aobits-1));
        
        ni_writew(data,(chan)? DAC1_Direct_Data : DAC0_Direct_Data);
 }
@@ -1589,7 +1590,7 @@ static int ni_read_eeprom(comedi_device *dev,int addr)
        for(bit=0x80;bit;bit>>=1){
                ni_writeb_p(0x04,Serial_Command);
                ni_writeb_p(0x05,Serial_Command);
-               bitstring|=((ni_readb_p(Status)&0x01)?bit:0);
+               bitstring|=((ni_readb_p(XXX_Status)&0x01)?bit:0);
        }
        ni_writeb_p(0x00,Serial_Command);
        
index 5ea8dd54b58cd2adb42091ad10585fea42ec321a..899a1edf12348f02721f93c503872502e7e7a567 100644 (file)
 /* i/o port offsets */
 
 /* 8 bit registers */
-#define Status                         0x01
+#define XXX_Status                     0x01
 #define Serial_Command                 0x0d
 #define Misc_Command                   0x0f
 #define Port_A                         0x19