From ef6d38f1e95fcf8eaa1005ad84a481a192db3e38 Mon Sep 17 00:00:00 2001 From: David Schleef Date: Sat, 19 Aug 2000 00:59:02 +0000 Subject: [PATCH] Additonal info on PCI boards, readded warning for unknown boards --- comedi/drivers/mite.c | 16 ++++++++++++ comedi/drivers/ni_mio_common.c | 18 +++++++++++--- comedi/drivers/ni_pcimio.c | 45 +++++++++++++++++++++++++--------- comedi/drivers/ni_stc.h | 2 +- 4 files changed, 64 insertions(+), 17 deletions(-) diff --git a/comedi/drivers/mite.c b/comedi/drivers/mite.c index 1f384156..7541f2cf 100644 --- a/comedi/drivers/mite.c +++ b/comedi/drivers/mite.c @@ -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 }; @@ -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 diff --git a/comedi/drivers/ni_mio_common.c b/comedi/drivers/ni_mio_common.c index 3cadb08d..81a07b02 100644 --- a/comedi/drivers/ni_mio_common.c +++ b/comedi/drivers/ni_mio_common.c @@ -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) */ diff --git a/comedi/drivers/ni_pcimio.c b/comedi/drivers/ni_pcimio.c index 7129948d..0c9afa8a 100644 --- a/comedi/drivers/ni_pcimio.c +++ b/comedi/drivers/ni_pcimio.c @@ -86,13 +86,11 @@ 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; } diff --git a/comedi/drivers/ni_stc.h b/comedi/drivers/ni_stc.h index 7fbefdc4..1e7e13a2 100644 --- a/comedi/drivers/ni_stc.h +++ b/comedi/drivers/ni_stc.h @@ -506,7 +506,7 @@ 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, -- 2.26.2