Fixed up some m-series board entries using board specification documents.
authorFrank Mori Hess <fmhess@speakeasy.net>
Tue, 20 Dec 2005 00:13:05 +0000 (00:13 +0000)
committerFrank Mori Hess <fmhess@speakeasy.net>
Tue, 20 Dec 2005 00:13:05 +0000 (00:13 +0000)
comedi/drivers/ni_mio_common.c
comedi/drivers/ni_pcimio.c
comedi/drivers/ni_stc.h

index defa3faa2d679b5b4226194c01486052a9eb7b97..00501795f754be5e7fd598e7f3eae1adfa03cde2 100644 (file)
@@ -84,7 +84,9 @@ static short ni_gainlkup[][16]={
        /* ai_gain_4 */
        { 0, 1, 4, 7 },
        /* ai_gain_611x */
-       { 0x00a, 0x00b, 0x001, 0x002, 0x003, 0x004, 0x005, 0x006 }
+       { 0x00a, 0x00b, 0x001, 0x002, 0x003, 0x004, 0x005, 0x006 },
+       /* ai_gain_622x FIXME: guesses */
+       { 1, 2, 3, 4, 0x101, 0x102, 0x103, 0x104 }
 };
 
 static comedi_lrange range_ni_E_ai={   16, {
@@ -147,6 +149,16 @@ static comedi_lrange range_ni_E_ai_611x={ 8, {
        RANGE( -0.5,    0.5     ),
        RANGE( -0.2,    0.2     ),
 }};
+static comedi_lrange range_ni_E_ai_622x={ 8, {
+       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_E_ao_ext = { 4, {
        RANGE( -10,     10      ),
        RANGE( 0,       10      ),
@@ -160,6 +172,7 @@ static comedi_lrange *ni_range_lkup[]={
        &range_ni_E_ai_limited14,
        &range_ni_E_ai_bipolar4,
        &range_ni_E_ai_611x,
+       &range_ni_E_ai_622x
 };
 
 
index a81ac8108c2d53dd2e28ac7b954c6594b824fee3..a656eb14f43bb9798cd80d1f4103b80047c80b44 100644 (file)
@@ -679,7 +679,7 @@ static ni_board ni_boards[]={
                n_adchan:       16,
                adbits:         16,
                ai_fifo_depth:  512,    //FIXME: guess
-               gainlkup:       ai_gain_4,      //FIXME: guess
+               gainlkup:       ai_gain_622x,
                ai_speed:       4000,
                n_aochan:       0,
                aobits:         0,
@@ -693,12 +693,12 @@ static ni_board ni_boards[]={
                name:           "pci-6221",
                n_adchan:       16,
                adbits:         16,
-               ai_fifo_depth:  512,    //FIXME: guess
-               gainlkup:       ai_gain_4,      //FIXME: guess
+               ai_fifo_depth:  4095,
+               gainlkup:       ai_gain_622x,
                ai_speed:       4000,
                n_aochan:       2,
                aobits:         16,
-               ao_fifo_depth:  512,    //FIXME: guess
+               ao_fifo_depth:  8191,
                reg_type:       ni_reg_m_series,
                ao_unipolar:    0,
 //             ao_speed:       1200,
@@ -709,12 +709,12 @@ static ni_board ni_boards[]={
                name:           "pci-6221_37pin",
                n_adchan:       16,
                adbits:         16,
-               ai_fifo_depth:  512,    //FIXME: guess
-               gainlkup:       ai_gain_4,      //FIXME: guess
+               ai_fifo_depth:  4095,
+               gainlkup:       ai_gain_622x,
                ai_speed:       4000,
                n_aochan:       2,
                aobits:         16,
-               ao_fifo_depth:  512,    //FIXME: guess
+               ao_fifo_depth:  8191,
                reg_type:       ni_reg_m_series,
                ao_unipolar:    0,
 //             ao_speed:       1200,
@@ -725,12 +725,12 @@ static ni_board ni_boards[]={
                name:           "pci-6224",
                n_adchan:       32,
                adbits:         16,
-               ai_fifo_depth:  512,    //FIXME: guess
-               gainlkup:       ai_gain_4,      //FIXME: guess
+               ai_fifo_depth:  4095,
+               gainlkup:       ai_gain_622x,
                ai_speed:       4000,
                n_aochan:       0,
                aobits:         0,
-               ao_fifo_depth:  0,      //FIXME: guess
+               ao_fifo_depth:  0,
                reg_type:       ni_reg_m_series,
                ao_unipolar:    0,
 //             ao_speed:       0,
@@ -741,12 +741,12 @@ static ni_board ni_boards[]={
                name:           "pci-6225",
                n_adchan:       80,
                adbits:         16,
-               ai_fifo_depth:  512,    //FIXME: guess
-               gainlkup:       ai_gain_4,      //FIXME: guess
+               ai_fifo_depth:  4095,
+               gainlkup:       ai_gain_622x,
                ai_speed:       4000,
                n_aochan:       2,
                aobits:         16,
-               ao_fifo_depth:  512,    //FIXME: guess
+               ao_fifo_depth:  8191,
                reg_type:       ni_reg_m_series,
                ao_unipolar:    0,
 //             ao_speed:       1200,
@@ -757,12 +757,12 @@ static ni_board ni_boards[]={
                name:           "pci-6229",
                n_adchan:       32,
                adbits:         16,
-               ai_fifo_depth:  512,    //FIXME: guess
-               gainlkup:       ai_gain_4,      //FIXME: guess
+               ai_fifo_depth:  4095,
+               gainlkup:       ai_gain_622x,
                ai_speed:       4000,
                n_aochan:       4,
                aobits:         16,
-               ao_fifo_depth:  512,    //FIXME: guess
+               ao_fifo_depth:  8191,
                reg_type:       ni_reg_m_series,
                ao_unipolar:    0,
 //             ao_speed:       1200,
@@ -773,8 +773,8 @@ static ni_board ni_boards[]={
                name:           "pci-6250",
                n_adchan:       16,
                adbits:         16,
-               ai_fifo_depth:  512,    //FIXME: guess
-               gainlkup:       ai_gain_4,      //FIXME: guess
+               ai_fifo_depth:  4095,
+               gainlkup:       ai_gain_14,
                ai_speed:       800,
                n_aochan:       0,
                aobits:         0,
@@ -788,12 +788,12 @@ static ni_board ni_boards[]={
                name:           "pci-6251",
                n_adchan:       16,
                adbits:         16,
-               ai_fifo_depth:  512,    //FIXME: guess
-               gainlkup:       ai_gain_4,      //FIXME: guess
+               ai_fifo_depth:  4095,
+               gainlkup:       ai_gain_14,
                ai_speed:       800,
                n_aochan:       2,
                aobits:         16,
-               ao_fifo_depth:  512,    //FIXME: guess
+               ao_fifo_depth:  8191,
                reg_type:       ni_reg_m_series,
                ao_unipolar:    0,
 //             ao_speed:       357,
@@ -804,8 +804,8 @@ static ni_board ni_boards[]={
                name:           "pci-6254",
                n_adchan:       32,
                adbits:         16,
-               ai_fifo_depth:  512,    //FIXME: guess
-               gainlkup:       ai_gain_4,      //FIXME: guess
+               ai_fifo_depth:  4095,
+               gainlkup:       ai_gain_14,
                ai_speed:       800,
                n_aochan:       0,
                aobits:         0,
@@ -819,12 +819,12 @@ static ni_board ni_boards[]={
                name:           "pci-6259",
                n_adchan:       32,
                adbits:         16,
-               ai_fifo_depth:  512,    //FIXME: guess
-               gainlkup:       ai_gain_4,      //FIXME: guess
+               ai_fifo_depth:  4095,
+               gainlkup:       ai_gain_14,
                ai_speed:       800,
                n_aochan:       4,
                aobits:         16,
-               ao_fifo_depth:  512,    //FIXME: guess
+               ao_fifo_depth:  8191,
                reg_type:       ni_reg_m_series,
                ao_unipolar:    0,
 //             ao_speed:       357,
@@ -835,12 +835,12 @@ static ni_board ni_boards[]={
                name:           "pci-6280",
                n_adchan:       16,
                adbits:         18,
-               ai_fifo_depth:  512,    //FIXME: guess
-               gainlkup:       ai_gain_4,      //FIXME: guess
+               ai_fifo_depth:  2047,
+               gainlkup:       ai_gain_14,
                ai_speed:       2000,
                n_aochan:       0,
                aobits:         0,
-               ao_fifo_depth:  0,
+               ao_fifo_depth:  8191,
                reg_type:       ni_reg_m_series,
                ao_unipolar:    0,
                caldac:         {ad8804_debug}, //FIXME: guess
@@ -850,14 +850,14 @@ static ni_board ni_boards[]={
                name:           "pci-6281",
                n_adchan:       16,
                adbits:         18,
-               ai_fifo_depth:  512,    //FIXME: guess
-               gainlkup:       ai_gain_4,      //FIXME: guess
+               ai_fifo_depth:  2047,
+               gainlkup:       ai_gain_14,
                ai_speed:       800,
                n_aochan:       2,
                aobits:         16,
-               ao_fifo_depth:  512,    //FIXME: guess
+               ao_fifo_depth:  8191,
                reg_type:       ni_reg_m_series,
-               ao_unipolar:    0,
+               ao_unipolar:    1,
 //             ao_speed:       357,
                caldac:         {ad8804_debug}, //FIXME: guess
                has_8255:       0,
@@ -866,8 +866,8 @@ static ni_board ni_boards[]={
                name:           "pci-6284",
                n_adchan:       32,
                adbits:         18,
-               ai_fifo_depth:  512,    //FIXME: guess
-               gainlkup:       ai_gain_4,      //FIXME: guess
+               ai_fifo_depth:  2047,
+               gainlkup:       ai_gain_14,
                ai_speed:       2000,
                n_aochan:       0,
                aobits:         0,
@@ -881,14 +881,14 @@ static ni_board ni_boards[]={
                name:           "pci-6289",
                n_adchan:       32,
                adbits:         18,
-               ai_fifo_depth:  512,    //FIXME: guess
-               gainlkup:       ai_gain_4,      //FIXME: guess
+               ai_fifo_depth:  2047,
+               gainlkup:       ai_gain_14,
                ai_speed:       800,
                n_aochan:       4,
                aobits:         16,
-               ao_fifo_depth:  512,    //FIXME: guess
+               ao_fifo_depth:  8191,
                reg_type:       ni_reg_m_series,
-               ao_unipolar:    0,
+               ao_unipolar:    1,
 //             ao_speed:       357,
                caldac:         {ad8804_debug}, //FIXME: guess
                has_8255:       0,
index 588588eafdfbfbf86b9c03406529f62e90e3f450..a7db1722871af3c170d1d7e5d4374a88dd9ff24d 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 };
+enum{ ai_gain_16=0, ai_gain_8, ai_gain_14, ai_gain_4, ai_gain_611x, ai_gain_622x };
 enum caldac_enum { caldac_none=0, mb88341, dac8800, dac8043, ad8522,
        ad8804, ad8842, ad8804_debug };
 enum ni_reg_type {