From 3a98b3084320b25f098629c99818f8f9d7e9ecb9 Mon Sep 17 00:00:00 2001 From: Frank Mori Hess Date: Sun, 1 Jan 2006 23:15:55 +0000 Subject: [PATCH] Fixed caldacs and ai ranges in board array for m-series boards. --- comedi/drivers/ni_mio_common.c | 22 +++++++++++------ comedi/drivers/ni_pcimio.c | 44 +++++++++++++++++----------------- comedi/drivers/ni_stc.h | 2 +- 3 files changed, 38 insertions(+), 30 deletions(-) diff --git a/comedi/drivers/ni_mio_common.c b/comedi/drivers/ni_mio_common.c index d4825692..b4a56350 100644 --- a/comedi/drivers/ni_mio_common.c +++ b/comedi/drivers/ni_mio_common.c @@ -86,7 +86,9 @@ static short ni_gainlkup[][16]={ /* ai_gain_611x */ { 0x00a, 0x00b, 0x001, 0x002, 0x003, 0x004, 0x005, 0x006 }, /* ai_gain_622x FIXME: guesses */ - { 1, 2, 3, 4, 0x101, 0x102, 0x103, 0x104 } + { 1, 2, 3, 4}, + /* ai_gain_628x */ + { 1, 2, 3, 4, 5, 6, 7} }; static comedi_lrange range_ni_E_ai={ 16, { @@ -149,15 +151,20 @@ static comedi_lrange range_ni_E_ai_611x={ 8, { RANGE( -0.5, 0.5 ), RANGE( -0.2, 0.2 ), }}; -static comedi_lrange range_ni_M_ai_622x={ 8, { +static comedi_lrange range_ni_M_ai_622x={ 4, { RANGE(-10, 10), RANGE(-5, 5), RANGE(-1, 1), RANGE(-0.2, 0.2), - RANGE(0, 10), - RANGE(0, 5), - RANGE(0, 1), - RANGE(0, 0.2), +}}; +static comedi_lrange range_ni_M_ai_628x={ 7, { + RANGE( -10, 10 ), + RANGE( -5, 5 ), + RANGE( -2, 2 ), + RANGE( -1, 1 ), + RANGE( -0.5, 0.5 ), + RANGE( -0.2, 0.2 ), + RANGE( -0.1, 0.1 ), }}; static comedi_lrange range_ni_E_ao_ext = { 4, { RANGE( -10, 10 ), @@ -172,7 +179,8 @@ static comedi_lrange *ni_range_lkup[]={ &range_ni_E_ai_limited14, &range_ni_E_ai_bipolar4, &range_ni_E_ai_611x, - &range_ni_M_ai_622x + &range_ni_M_ai_622x, + &range_ni_M_ai_628x }; diff --git a/comedi/drivers/ni_pcimio.c b/comedi/drivers/ni_pcimio.c index e8561709..072508ec 100644 --- a/comedi/drivers/ni_pcimio.c +++ b/comedi/drivers/ni_pcimio.c @@ -743,7 +743,7 @@ static ni_board ni_boards[]={ ao_fifo_depth: 0, reg_type: ni_reg_m_series, ao_unipolar: 0, - caldac: {ad8804_debug}, //FIXME: guess + .caldac = {caldac_none}, has_8255: 0, }, { device_id: 0x70af, @@ -760,7 +760,7 @@ static ni_board ni_boards[]={ reg_type: ni_reg_m_series, ao_unipolar: 0, // ao_speed: 1200, - caldac: {ad8804_debug}, //FIXME: guess + .caldac = {caldac_none}, has_8255: 0, }, { device_id: 0x71bc, @@ -777,7 +777,7 @@ static ni_board ni_boards[]={ reg_type: ni_reg_m_series, ao_unipolar: 0, // ao_speed: 1200, - caldac: {ad8804_debug}, //FIXME: guess + .caldac = {caldac_none}, has_8255: 0, }, { device_id: 0x70f2, @@ -793,7 +793,7 @@ static ni_board ni_boards[]={ reg_type: ni_reg_m_series, ao_unipolar: 0, // ao_speed: 0, - caldac: {ad8804_debug}, //FIXME: guess + .caldac = {caldac_none}, has_8255: 0, }, { device_id: 0x716c, @@ -810,7 +810,7 @@ static ni_board ni_boards[]={ reg_type: ni_reg_m_series, ao_unipolar: 0, // ao_speed: 1200, - caldac: {ad8804_debug}, //FIXME: guess + .caldac = {caldac_none}, has_8255: 0, }, { device_id: 0x70aa, @@ -827,7 +827,7 @@ static ni_board ni_boards[]={ reg_type: ni_reg_m_series, ao_unipolar: 0, // ao_speed: 1200, - caldac: {ad8804_debug}, //FIXME: guess + .caldac = {caldac_none}, has_8255: 0, }, { device_id: 0x70b4, @@ -835,14 +835,14 @@ static ni_board ni_boards[]={ n_adchan: 16, adbits: 16, ai_fifo_depth: 4095, - gainlkup: ai_gain_14, + .gainlkup = ai_gain_628x, ai_speed: 800, n_aochan: 0, aobits: 0, ao_fifo_depth: 0, reg_type: ni_reg_m_series, ao_unipolar: 0, - caldac: {ad8804_debug}, //FIXME: guess + .caldac = {caldac_none}, has_8255: 0, }, { device_id: 0x70b8, @@ -850,7 +850,7 @@ static ni_board ni_boards[]={ n_adchan: 16, adbits: 16, ai_fifo_depth: 4095, - gainlkup: ai_gain_14, + .gainlkup = ai_gain_628x, ai_speed: 800, n_aochan: 2, aobits: 16, @@ -859,7 +859,7 @@ static ni_board ni_boards[]={ reg_type: ni_reg_m_series, ao_unipolar: 0, // ao_speed: 357, - caldac: {ad8804_debug}, //FIXME: guess + .caldac = {caldac_none}, has_8255: 0, }, { device_id: 0x70b7, @@ -867,14 +867,14 @@ static ni_board ni_boards[]={ n_adchan: 32, adbits: 16, ai_fifo_depth: 4095, - gainlkup: ai_gain_14, + .gainlkup = ai_gain_628x, ai_speed: 800, n_aochan: 0, aobits: 0, ao_fifo_depth: 0, reg_type: ni_reg_m_series, ao_unipolar: 0, - caldac: {ad8804_debug}, //FIXME: guess + .caldac = {caldac_none}, has_8255: 0, }, { device_id: 0x70ab, @@ -882,7 +882,7 @@ static ni_board ni_boards[]={ n_adchan: 32, adbits: 16, ai_fifo_depth: 4095, - gainlkup: ai_gain_14, + .gainlkup = ai_gain_628x, ai_speed: 800, n_aochan: 4, aobits: 16, @@ -891,7 +891,7 @@ static ni_board ni_boards[]={ reg_type: ni_reg_m_series, ao_unipolar: 0, // ao_speed: 357, - caldac: {ad8804_debug}, //FIXME: guess + .caldac = {caldac_none}, has_8255: 0, }, { device_id: 0x70b6, @@ -899,14 +899,14 @@ static ni_board ni_boards[]={ n_adchan: 16, adbits: 18, ai_fifo_depth: 2047, - gainlkup: ai_gain_14, + .gainlkup = ai_gain_628x, ai_speed: 2000, n_aochan: 0, aobits: 0, ao_fifo_depth: 8191, reg_type: ni_reg_m_series, ao_unipolar: 0, - caldac: {ad8804_debug}, //FIXME: guess + .caldac = {caldac_none}, has_8255: 0, }, { device_id: 0x70bd, @@ -914,7 +914,7 @@ static ni_board ni_boards[]={ n_adchan: 16, adbits: 18, ai_fifo_depth: 2047, - gainlkup: ai_gain_14, + .gainlkup = ai_gain_628x, ai_speed: 800, n_aochan: 2, aobits: 16, @@ -923,7 +923,7 @@ static ni_board ni_boards[]={ reg_type: ni_reg_m_series, ao_unipolar: 1, // ao_speed: 357, - caldac: {ad8804_debug}, //FIXME: guess + .caldac = {caldac_none}, has_8255: 0, }, { device_id: 0x70bc, @@ -931,14 +931,14 @@ static ni_board ni_boards[]={ n_adchan: 32, adbits: 18, ai_fifo_depth: 2047, - gainlkup: ai_gain_14, + .gainlkup = ai_gain_628x, ai_speed: 2000, n_aochan: 0, aobits: 0, ao_fifo_depth: 0, reg_type: ni_reg_m_series, ao_unipolar: 0, - caldac: {ad8804_debug}, //FIXME: guess + .caldac = {caldac_none}, has_8255: 0, }, { device_id: 0x70ac, @@ -946,7 +946,7 @@ static ni_board ni_boards[]={ n_adchan: 32, adbits: 18, ai_fifo_depth: 2047, - gainlkup: ai_gain_14, + .gainlkup = ai_gain_628x, ai_speed: 800, n_aochan: 4, aobits: 16, @@ -955,7 +955,7 @@ static ni_board ni_boards[]={ reg_type: ni_reg_m_series, ao_unipolar: 1, // ao_speed: 357, - caldac: {ad8804_debug}, //FIXME: guess + .caldac = {caldac_none}, has_8255: 0, }, }; diff --git a/comedi/drivers/ni_stc.h b/comedi/drivers/ni_stc.h index 23b260c5..741c6edf 100644 --- a/comedi/drivers/ni_stc.h +++ b/comedi/drivers/ni_stc.h @@ -757,7 +757,7 @@ enum mite_dma_channel{ GPC1_DMA_CHAN = 3, }; -enum{ ai_gain_16=0, ai_gain_8, ai_gain_14, ai_gain_4, ai_gain_611x, ai_gain_622x }; +enum{ ai_gain_16=0, ai_gain_8, ai_gain_14, ai_gain_4, ai_gain_611x, ai_gain_622x, ai_gain_628x }; enum caldac_enum { caldac_none=0, mb88341, dac8800, dac8043, ad8522, ad8804, ad8842, ad8804_debug }; enum ni_reg_type { -- 2.26.2