Additonal info on PCI boards, readded warning for unknown boards
authorDavid Schleef <ds@schleef.org>
Sat, 19 Aug 2000 00:59:02 +0000 (00:59 +0000)
committerDavid Schleef <ds@schleef.org>
Sat, 19 Aug 2000 00:59:02 +0000 (00:59 +0000)
comedi/drivers/mite.c
comedi/drivers/ni_mio_common.c
comedi/drivers/ni_pcimio.c
comedi/drivers/ni_stc.h

index 1f384156261c0a3dc4355dcfa46734db95be00e3..7541f2cfe708790cb6968645f4cb9dbc3e2af731 100644 (file)
@@ -238,6 +238,19 @@ void mite_unsetup(struct mite_struct *mite)
 }
 
 
+void mite_list_devices(void)
+{
+       struct mite_struct *mite,*next;
+       
+       printk("Available NI device IDs:");
+       for(mite=mite_devices;mite;mite=next){
+               next=mite->next;
+               printk(" 0x%04x",mite_device_id(mite));
+       }
+       printk("\n");
+
+}
+
 int mite_kvmem_segment_load(struct mite_struct *mite,int i,char *kvmem,unsigned int len)
 {
        int count,offset;
@@ -323,6 +336,7 @@ void mite_dma_disarm(struct mite_struct *mite)
 int init_module(void)
 {
        mite_init();
+       mite_list_devices();
 
        return 0;
 }
@@ -343,6 +357,7 @@ struct symbol_table mite_syms = {
        X(mite_unsetup),
        X(mite_kvmem_segment_load),
        X(mite_devices),
+       X(mite_list_devices),
 #include <linux/symtab_end.h>
 };
 
@@ -358,6 +373,7 @@ EXPORT_SYMBOL(mite_setup);
 EXPORT_SYMBOL(mite_unsetup);
 EXPORT_SYMBOL(mite_kvmem_segment_load);
 EXPORT_SYMBOL(mite_devices);
+EXPORT_SYMBOL(mite_list_devices);
 
 #endif
 
index 3cadb08d06489d191a7e0038296e4bb9f0cdf11b..81a07b02cd7c24398662df29c23dcb990a3d179a 100644 (file)
@@ -62,7 +62,8 @@ static int ni_gainlkup[][16]={
        { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15 },
        { 1, 2, 4, 7, 9, 10, 12, 15, 0,0,0,0,0,0,0,0 },
        { 1, 2, 3, 4, 5, 6, 7, 9, 10, 11, 12, 13, 14, 15, 0,0 },
-       { 0, 1, 4, 7, 8, 9, 12, 15, 0, 0, 0, 0, 0, 0, 0, 0 }
+       { 0, 1, 4, 7, 8, 9, 12, 15, 0, 0, 0, 0, 0, 0, 0, 0 },
+       { 0, 1, 4, 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }
 };
 
 static comedi_lrange range_ni_E_ai={   16, {
@@ -119,6 +120,12 @@ static comedi_lrange range_ni_E_ai_limited_602x={ 8, {
        RANGE( 0,       1       ),
        RANGE( 0,       0.1     ),
 }};
+static comedi_lrange range_ni_E_ai_603x={ 4, {
+       RANGE( -10,     10      ),
+       RANGE( -5,      5       ),
+       RANGE( -0.5,    0.5     ),
+       RANGE( -0.05,   0.05    ),
+}};
 #if 0
 static comedi_lrange range_ni_E_ao = { 2, {
        RANGE( -10,     10      ),
@@ -136,7 +143,8 @@ static comedi_lrange *ni_range_lkup[]={
        &range_ni_E_ai,
        &range_ni_E_ai_limited,
        &range_ni_E_ai_limited14,
-       &range_ni_E_ai_limited_602x
+       &range_ni_E_ai_limited_602x,
+       &range_ni_E_ai_603x,
 };
 
 
@@ -769,7 +777,8 @@ static int ni_ai_cmd(comedi_device *dev,comedi_subdevice *s)
                win_out((cmd->stop_arg-1)>>16,AI_SC_Load_A_Registers);
                win_out((cmd->stop_arg-1)&0xffff,AI_SC_Load_A_Registers+1);
 
-               mode1 |= AI_Start_Stop | AI_Mode_1_Reserved | AI_Trigger_Once;
+               //mode1 |= AI_Start_Stop | AI_Mode_1_Reserved | AI_Trigger_Once;
+               mode1 |= 0xd;
                win_out(mode1,AI_Mode_1_Register);
        
                /* load SC (Scan Count) */
@@ -781,7 +790,8 @@ static int ni_ai_cmd(comedi_device *dev,comedi_subdevice *s)
                win_out(0,AI_SC_Load_A_Registers);
                win_out(0,AI_SC_Load_A_Registers+1);
        
-               mode1 |= AI_Start_Stop | AI_Mode_1_Reserved | AI_Continuous;
+               //mode1 |= AI_Start_Stop | AI_Mode_1_Reserved | AI_Continuous;
+               mode1 |= 0xe;
                win_out(mode1,AI_Mode_1_Register);
 
                /* load SC (Scan Count) */
index 7129948d5dc02303736ae884a42201bc94de6443..0c9afa8a3d31313fc169a6c500b79454411cc19f 100644 (file)
 static struct caldac_struct *type1[]={&caldac_dac8800,&caldac_dac8043,NULL};
 static struct caldac_struct *type2[]={&caldac_dac8800,&caldac_dac8043,&caldac_ad8522};
 static struct caldac_struct *type3[]={&caldac_mb88341,NULL,NULL};
-#if 0
 static struct caldac_struct *type4[]={&caldac_mb88341,&caldac_mb88341,&caldac_ad8522};
-#endif
 
 
 static ni_board ni_boards[]={
-       {       device_id:      0x0162,
+       {       device_id:      0x0162, // NI also says 0x1620.  typo?
                name:           "pci-mio-16xe-50",
                n_adchan:       16,
                adbits:         16,
@@ -256,7 +254,36 @@ static ni_board ni_boards[]={
                caldac:         type3,
                has_8255:       1,
        },
-#if 0
+       {       device_id:      0x0000,         /* unknown */
+               name:           "pci-6034e",
+               n_adchan:       16,
+               adbits:         16,
+               ai_fifo_depth:  512,
+               alwaysdither:   1,
+               gainlkup:       ai_gain_8_602x,
+               ai_speed:       5000,
+               n_aochan:       0,
+               aobits:         0,
+               ao_fifo_depth:  0,
+               ao_unipolar:    0,
+               caldac:         type3,
+               has_8255:       0,
+       },
+       {       device_id:      0x0000,         /* unknown */
+               name:           "pci-6035e",
+               n_adchan:       16,
+               adbits:         16,
+               ai_fifo_depth:  512,
+               alwaysdither:   1,
+               gainlkup:       ai_gain_4_603x,
+               ai_speed:       5000,
+               n_aochan:       2,
+               aobits:         12,
+               ao_fifo_depth:  0,
+               ao_unipolar:    0,
+               caldac:         type3,
+               has_8255:       0,
+       },
        {       device_id:      0x0000,         /* unknown */
                name:           "pci-6052e",
                n_adchan:       16,
@@ -296,6 +323,7 @@ static ni_board ni_boards[]={
                ao_fifo_depth:  2048,
                caldac:         type4,          /* XXX */
        },
+#if 0
        {       device_id:      0x0000,         /* unknown */
                name:           "pci-6040e",
                ai_speed:       800,
@@ -304,14 +332,6 @@ static ni_board ni_boards[]={
                name:           "pci-6041e",
                ai_speed:       800,
        },
-       {       device_id:      0x0000,         /* unknown */
-               name:           "pci-6034e",
-               ai_speed:       5000,
-       },
-       {       device_id:      0x0000,         /* unknown */
-               name:           "pci-6035e",
-               ai_speed:       5000,
-       },
        {       device_id:      0x0000,         /* unknown */
                name:           "pci-1200",
                ai_speed:       10000,
@@ -501,6 +521,7 @@ static int pcimio_find_device(comedi_device *dev)
                }
        }
        printk("no device found\n");
+       mite_list_boards();
        return -EIO;
 }
 
index 7fbefdc4dda2a48601138b2d7d6d6fb47569e07a..1e7e13a2700cdddf3d61b016ca6e30dad27af81e 100644 (file)
        but I thought I'd put it here anyway.
 */
 
-enum{ ai_gain_16=0, ai_gain_8, ai_gain_14, ai_gain_8_602x };
+enum{ ai_gain_16=0, ai_gain_8, ai_gain_14, ai_gain_8_602x, ai_gain_4_603x };
 extern struct caldac_struct caldac_mb88341,
        caldac_dac8800,
        caldac_dac8043,