From: David Schleef Date: Fri, 5 May 2000 19:23:15 +0000 (+0000) Subject: changes for ni_mio_cs X-Git-Tag: r44~27 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=3d58ac45b63af9afa0894f5552f6b9ca7defd763;p=comedi.git changes for ni_mio_cs --- diff --git a/comedi/Config.in b/comedi/Config.in index db770625..8e5386e9 100644 --- a/comedi/Config.in +++ b/comedi/Config.in @@ -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 diff --git a/comedi/drivers/Makefile b/comedi/drivers/Makefile index 6ac327fd..575cc291 100644 --- a/comedi/drivers/Makefile +++ b/comedi/drivers/Makefile @@ -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 diff --git a/comedi/drivers/ni_mio_common.c b/comedi/drivers/ni_mio_common.c index 28354750..83220b35 100644 --- a/comedi/drivers/ni_mio_common.c +++ b/comedi/drivers/ni_mio_common.c @@ -1246,7 +1246,8 @@ for(i=0;in_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); diff --git a/comedi/drivers/ni_stc.h b/comedi/drivers/ni_stc.h index 5ea8dd54..899a1edf 100644 --- a/comedi/drivers/ni_stc.h +++ b/comedi/drivers/ni_stc.h @@ -398,7 +398,7 @@ /* 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