Fixed caldacs and ai ranges in board array for m-series boards.
authorFrank Mori Hess <fmhess@speakeasy.net>
Sun, 1 Jan 2006 23:15:55 +0000 (23:15 +0000)
committerFrank Mori Hess <fmhess@speakeasy.net>
Sun, 1 Jan 2006 23:15:55 +0000 (23:15 +0000)
comedi/drivers/ni_mio_common.c
comedi/drivers/ni_pcimio.c
comedi/drivers/ni_stc.h

index d48256922fd74e37e9f044dd9d10b86718a54a8b..b4a5635062f43de8809d23ad98d96c6473b2cbcc 100644 (file)
@@ -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
 };
 
 
index e85617091c126254b416282b462f3a11adef6bec..072508eccfced960ff33ca21c8fb8b35b9ec0987 100644 (file)
@@ -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,
        },
 };
index 23b260c59274d02996fdddf4258986431a15d1a7..741c6edf394f0d888f960cfa465715d73eee2901 100644 (file)
@@ -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 {