From 4a31ee5fe08c2bd8d9af9ae6143889051d7b9cf7 Mon Sep 17 00:00:00 2001 From: Frank Mori Hess Date: Wed, 2 May 2007 16:12:54 +0000 Subject: [PATCH] Added ao_speed board field for maximum analog output update rate with commands. --- comedi/drivers/ni_atmio.c | 7 ++++ comedi/drivers/ni_mio_cs.c | 3 ++ comedi/drivers/ni_pcimio.c | 78 ++++++++++++++++++++++---------------- comedi/drivers/ni_stc.h | 1 + 4 files changed, 56 insertions(+), 33 deletions(-) diff --git a/comedi/drivers/ni_atmio.c b/comedi/drivers/ni_atmio.c index f0a1efe2..73e82fc0 100644 --- a/comedi/drivers/ni_atmio.c +++ b/comedi/drivers/ni_atmio.c @@ -130,6 +130,7 @@ static ni_board ni_boards[]={ ao_fifo_depth: 2048, .ao_range_table = &range_ni_E_ao_ext, ao_unipolar: 1, + ao_speed: 1000, has_8255: 0, caldac: {mb88341}, }, @@ -147,6 +148,7 @@ static ni_board ni_boards[]={ ao_fifo_depth: 2048, .ao_range_table = &range_ni_E_ao_ext, ao_unipolar: 1, + ao_speed: 1000, has_8255: 0, caldac: {mb88341}, }, @@ -164,6 +166,7 @@ static ni_board ni_boards[]={ ao_fifo_depth: 0, .ao_range_table = &range_ni_E_ao_ext, ao_unipolar: 1, + ao_speed: 10000, caldac: {ad8804_debug}, has_8255: 0, }, @@ -181,6 +184,7 @@ static ni_board ni_boards[]={ ao_fifo_depth: 0, .ao_range_table = &range_ni_E_ao_ext, ao_unipolar: 1, + ao_speed: 10000, caldac: {ad8804_debug}, has_8255: 1, }, @@ -198,6 +202,7 @@ static ni_board ni_boards[]={ ao_fifo_depth: 2048, .ao_range_table = &range_ni_E_ao_ext, ao_unipolar: 1, + ao_speed: 1000, has_8255: 0, caldac: {ad8804_debug}, }, @@ -215,6 +220,7 @@ static ni_board ni_boards[]={ ao_fifo_depth: 0, .ao_range_table = &range_bipolar10, ao_unipolar: 0, + ao_speed: 50000, caldac: {dac8800,dac8043}, has_8255: 0, }, @@ -232,6 +238,7 @@ static ni_board ni_boards[]={ ao_fifo_depth: 2048, .ao_range_table = &range_ni_E_ao_ext, ao_unipolar: 1, + ao_speed: 1000, caldac: {dac8800,dac8043,ad8522}, has_8255: 0, }, diff --git a/comedi/drivers/ni_mio_cs.c b/comedi/drivers/ni_mio_cs.c index 099fd15c..7403c73e 100644 --- a/comedi/drivers/ni_mio_cs.c +++ b/comedi/drivers/ni_mio_cs.c @@ -111,6 +111,7 @@ static ni_board ni_boards[]={ ao_fifo_depth: 2048, .ao_range_table = &range_bipolar10, ao_unipolar: 0, + ao_speed: 1176, has_8255: 0, caldac: {ad8804_debug}, /* verified */ }, @@ -127,6 +128,7 @@ static ni_board ni_boards[]={ ao_fifo_depth: 0, .ao_range_table = &range_bipolar10, ao_unipolar: 0, + ao_speed: 1000000, has_8255: 0, caldac: {ad8804_debug}, }, @@ -143,6 +145,7 @@ static ni_board ni_boards[]={ ao_fifo_depth: 0, .ao_range_table = &range_bipolar10, ao_unipolar: 0, + ao_speed: 1000000, has_8255: 0, caldac: {ad8804_debug}, }, diff --git a/comedi/drivers/ni_pcimio.c b/comedi/drivers/ni_pcimio.c index b1a38dee..aa8dcc10 100644 --- a/comedi/drivers/ni_pcimio.c +++ b/comedi/drivers/ni_pcimio.c @@ -27,13 +27,13 @@ Author: ds, John Hallen, Frank Mori Hess, Rolf Mueller, Herbert Peremans, Status: works Devices: [National Instruments] PCI-MIO-16XE-50 (ni_pcimio), PCI-MIO-16XE-10, PXI-6030E, PCI-MIO-16E-1, PCI-MIO-16E-4, PCI-6014, PCI-6040E, - PXI-6040E, PCI-6031E, PCI-6032E, PCI-6033E, PCI-6071E, PCI-6023E, + PXI-6040E, PCI-6030E, PCI-6031E, PCI-6032E, PCI-6033E, PCI-6071E, PCI-6023E, PCI-6024E, PCI-6025E, PXI-6025E, PCI-6034E, PCI-6035E, PCI-6052E, PCI-6110, PCI-6111, PCI-6220, PCI-6221, PCI-6224, PCI-6225, PCI-6229, PCI-6250, PCI-6251, PCI-6254, PCI-6259, PCIe-6259, PCI-6280, PCI-6281, PXI-6281, PCI-6284, PCI-6289, PCI-6711, PXI-6711, PCI-6713, PXI-6713, - PXI-6071E, PXI-6070E, + PXI-6071E, PCI-6070E, PXI-6070E, PXI-6052E, PCI-6036E, PCI-6731, PCI-6733, PXI-6733 PCI-6143 Updated: Wed Nov 29 10:30:36 EST 2006 @@ -222,11 +222,12 @@ static ni_board ni_boards[]={ ao_fifo_depth: 0, .ao_range_table = &range_bipolar10, ao_unipolar: 0, + ao_speed: 50000, caldac: {dac8800,dac8043}, has_8255: 0, }, { device_id: 0x1170, - name: "pci-mio-16xe-10", + name: "pci-mio-16xe-10", // aka pci-6030E n_adchan: 16, adbits: 16, ai_fifo_depth: 512, @@ -238,6 +239,7 @@ static ni_board ni_boards[]={ ao_fifo_depth: 2048, .ao_range_table = &range_ni_E_ao_ext, ao_unipolar: 1, + ao_speed: 10000, caldac: {dac8800,dac8043,ad8522}, has_8255: 0, }, @@ -254,6 +256,7 @@ static ni_board ni_boards[]={ ao_fifo_depth: 0, .ao_range_table = &range_bipolar10, ao_unipolar: 0, + ao_speed: 100000, caldac: {ad8804_debug}, has_8255: 0, }, @@ -270,12 +273,13 @@ static ni_board ni_boards[]={ ao_fifo_depth: 2048, .ao_range_table = &range_ni_E_ao_ext, ao_unipolar: 1, + ao_speed: 10000, caldac: {dac8800,dac8043,ad8522}, has_8255: 0, }, { device_id: 0x1180, - name: "pci-mio-16e-1", + name: "pci-mio-16e-1", /* aka pci-6070e */ n_adchan: 16, adbits: 12, ai_fifo_depth: 512, @@ -287,6 +291,7 @@ static ni_board ni_boards[]={ ao_fifo_depth: 2048, .ao_range_table = &range_ni_E_ao_ext, ao_unipolar: 1, + ao_speed: 1000, caldac: {mb88341}, has_8255: 0, }, @@ -305,6 +310,7 @@ static ni_board ni_boards[]={ ao_fifo_depth: 512, .ao_range_table = &range_ni_E_ao_ext, ao_unipolar: 1, + ao_speed: 1000, caldac: {ad8804_debug}, // doc says mb88341 has_8255: 0, }, @@ -321,6 +327,7 @@ static ni_board ni_boards[]={ ao_fifo_depth: 512, .ao_range_table = &range_ni_E_ao_ext, ao_unipolar: 1, + ao_speed: 1000, caldac: {mb88341}, has_8255: 0, }, @@ -338,6 +345,7 @@ static ni_board ni_boards[]={ ao_fifo_depth: 2048, .ao_range_table = &range_ni_E_ao_ext, ao_unipolar: 1, + ao_speed: 10000, caldac: {dac8800,dac8043,ad8522}, has_8255: 0, }, @@ -384,6 +392,7 @@ static ni_board ni_boards[]={ ao_fifo_depth: 2048, .ao_range_table = &range_ni_E_ao_ext, ao_unipolar: 1, + ao_speed: 1000, caldac: {ad8804_debug}, has_8255: 0, }, @@ -414,6 +423,7 @@ static ni_board ni_boards[]={ ao_fifo_depth: 0, .ao_range_table = &range_bipolar10, ao_unipolar: 0, + ao_speed: 100000, caldac: {ad8804_debug}, /* manual is wrong */ has_8255: 0, }, @@ -430,6 +440,7 @@ static ni_board ni_boards[]={ ao_fifo_depth: 0, .ao_range_table = &range_bipolar10, ao_unipolar: 0, + ao_speed: 100000, caldac: {ad8804_debug}, /* manual is wrong */ has_8255: 1, }, @@ -446,6 +457,7 @@ static ni_board ni_boards[]={ ao_fifo_depth: 0, .ao_range_table = &range_ni_E_ao_ext, ao_unipolar: 1, + ao_speed: 100000, caldac: {ad8804_debug}, /* manual is wrong */ has_8255: 1, }, @@ -478,6 +490,7 @@ static ni_board ni_boards[]={ ao_fifo_depth: 0, .ao_range_table = &range_bipolar10, ao_unipolar: 0, + ao_speed: 100000, caldac: {ad8804_debug}, has_8255: 0, }, @@ -494,25 +507,9 @@ static ni_board ni_boards[]={ ao_unipolar: 1, ao_fifo_depth: 2048, .ao_range_table = &range_ni_E_ao_ext, + ao_speed: 3000, caldac: {ad8804_debug,ad8804_debug,ad8522}, /* manual is wrong */ }, -#if 0 - { device_id: 0x0000, /* unknown */ - name: "pci-6053e", - n_adchan: 64, - adbits: 16, - ai_fifo_depth: 512, - alwaysdither: 1, - gainlkup: ai_gain_16, - ai_speed: 3000, - n_aochan: 2, - aobits: 16, - ao_unipolar: 1, - ao_fifo_depth: 2048, - .ao_range_table = &range_ni_E_ao_ext, - caldac: {ad8804,mb88341,ad8522}, /* manual is wrong */ - }, -#endif { device_id: 0x14e0, name: "pci-6110", n_adchan: 4, @@ -527,6 +524,7 @@ static ni_board ni_boards[]={ .ao_range_table = &range_bipolar10, ao_unipolar: 0, ao_fifo_depth: 2048, + ao_speed: 250, caldac: {ad8804,ad8804}, }, { device_id: 0x14f0, @@ -543,6 +541,7 @@ static ni_board ni_boards[]={ .ao_range_table = &range_bipolar10, ao_unipolar: 0, ao_fifo_depth: 2048, + ao_speed: 250, caldac: {ad8804,ad8804}, }, #if 0 @@ -560,6 +559,7 @@ static ni_board ni_boards[]={ ao_671x: 1, ao_unipolar: 0, ao_fifo_depth: 2048, + ao_speed: 250, reg_611x: 1, caldac: {ad8804_debug,ad8804_debug,ad8804_debug},/* XXX */ }, @@ -578,6 +578,7 @@ static ni_board ni_boards[]={ ao_671x: 1, ao_unipolar: 0, ao_fifo_depth: 2048, + ao_speed: 250, reg_611x: 1, caldac: {ad8804_debug,ad8804_debug,ad8804_debug},/* XXX */ }, @@ -590,6 +591,7 @@ static ni_board ni_boards[]={ ao_unipolar: 0, ao_fifo_depth: 16384, /* data sheet says 8192, but fifo really holds 16384 samples */ .ao_range_table = &range_bipolar10, + ao_speed: 1000, reg_type: ni_reg_6711, caldac: {ad8804_debug}, }, @@ -601,6 +603,7 @@ static ni_board ni_boards[]={ ao_unipolar: 0, ao_fifo_depth: 16384, .ao_range_table = &range_bipolar10, + ao_speed: 1000, reg_type: ni_reg_6711, caldac: {ad8804_debug}, }, @@ -612,6 +615,7 @@ static ni_board ni_boards[]={ ao_unipolar: 0, ao_fifo_depth: 16384, .ao_range_table = &range_bipolar10, + ao_speed: 1000, reg_type: ni_reg_6713, caldac: {ad8804_debug,ad8804_debug}, }, @@ -623,6 +627,7 @@ static ni_board ni_boards[]={ ao_unipolar: 0, ao_fifo_depth: 16384, .ao_range_table = &range_bipolar10, + ao_speed: 1000, reg_type: ni_reg_6713, caldac: {ad8804_debug,ad8804_debug}, }, @@ -634,6 +639,7 @@ static ni_board ni_boards[]={ ao_unipolar: 0, ao_fifo_depth: 8192, .ao_range_table = &range_bipolar10, + ao_speed: 1000, reg_type: ni_reg_6711, caldac: {ad8804_debug}, }, @@ -658,6 +664,7 @@ static ni_board ni_boards[]={ ao_unipolar: 0, ao_fifo_depth: 16384, .ao_range_table = &range_bipolar10, + ao_speed: 1000, reg_type: ni_reg_6713, caldac: {ad8804_debug,ad8804_debug}, }, @@ -669,6 +676,7 @@ static ni_board ni_boards[]={ ao_unipolar: 0, ao_fifo_depth: 16384, .ao_range_table = &range_bipolar10, + ao_speed: 1000, reg_type: ni_reg_6713, caldac: {ad8804_debug,ad8804_debug}, }, @@ -685,6 +693,7 @@ static ni_board ni_boards[]={ ao_fifo_depth: 2048, .ao_range_table = &range_ni_E_ao_ext, ao_unipolar: 1, + ao_speed: 1000, caldac: {ad8804_debug}, has_8255: 0, }, @@ -701,7 +710,8 @@ static ni_board ni_boards[]={ ao_fifo_depth: 2048, .ao_range_table = &range_ni_E_ao_ext, ao_unipolar: 1, - caldac: {mb88341}, + ao_speed: 1000, + caldac: {ad8804_debug}, has_8255: 0, }, { device_id: 0x18c0, @@ -717,6 +727,7 @@ static ni_board ni_boards[]={ ao_unipolar: 1, ao_fifo_depth: 2048, .ao_range_table = &range_ni_E_ao_ext, + ao_speed: 3000, caldac: {mb88341,mb88341,ad8522}, }, { device_id: 0x1580, @@ -732,6 +743,7 @@ static ni_board ni_boards[]={ ao_fifo_depth: 2048, .ao_range_table = &range_ni_E_ao_ext, ao_unipolar: 1, + ao_speed: 10000, caldac: {dac8800,dac8043,ad8522}, }, { device_id: 0x2890, @@ -747,6 +759,7 @@ static ni_board ni_boards[]={ ao_fifo_depth: 0, .ao_range_table = &range_bipolar10, ao_unipolar: 0, + ao_speed: 100000, caldac: {ad8804_debug}, has_8255: 0, }, @@ -778,7 +791,7 @@ static ni_board ni_boards[]={ .ao_range_table = &range_ni_M_622x_ao, reg_type: ni_reg_622x, ao_unipolar: 0, -// ao_speed: 1200, + ao_speed: 1200, .caldac = {caldac_none}, has_8255: 0, }, @@ -795,7 +808,7 @@ static ni_board ni_boards[]={ .ao_range_table = &range_ni_M_622x_ao, reg_type: ni_reg_622x, ao_unipolar: 0, -// ao_speed: 1200, + ao_speed: 1200, .caldac = {caldac_none}, has_8255: 0, }, @@ -811,7 +824,6 @@ static ni_board ni_boards[]={ ao_fifo_depth: 0, reg_type: ni_reg_622x, ao_unipolar: 0, -// ao_speed: 0, .caldac = {caldac_none}, has_8255: 0, }, @@ -828,7 +840,7 @@ static ni_board ni_boards[]={ .ao_range_table = &range_ni_M_622x_ao, reg_type: ni_reg_622x, ao_unipolar: 0, -// ao_speed: 1200, + ao_speed: 1200, .caldac = {caldac_none}, has_8255: 0, }, @@ -845,7 +857,7 @@ static ni_board ni_boards[]={ .ao_range_table = &range_ni_M_622x_ao, reg_type: ni_reg_622x, ao_unipolar: 0, -// ao_speed: 1200, + ao_speed: 1200, .caldac = {caldac_none}, has_8255: 0, }, @@ -877,7 +889,7 @@ static ni_board ni_boards[]={ .ao_range_table = &range_ni_M_625x_ao, reg_type: ni_reg_625x, ao_unipolar: 0, -// ao_speed: 357, + ao_speed: 357, .caldac = {caldac_none}, has_8255: 0, }, @@ -909,7 +921,7 @@ static ni_board ni_boards[]={ .ao_range_table = &range_ni_M_625x_ao, reg_type: ni_reg_625x, ao_unipolar: 0, -// ao_speed: 357, + ao_speed: 357, .caldac = {caldac_none}, has_8255: 0, }, @@ -926,7 +938,7 @@ static ni_board ni_boards[]={ .ao_range_table = &range_ni_M_625x_ao, reg_type: ni_reg_625x, ao_unipolar: 0, -// ao_speed: 357, + ao_speed: 357, .caldac = {caldac_none}, has_8255: 0, }, @@ -958,7 +970,7 @@ static ni_board ni_boards[]={ .ao_range_table = &range_ni_M_628x_ao, reg_type: ni_reg_628x, ao_unipolar: 1, -// ao_speed: 357, + ao_speed: 357, .caldac = {caldac_none}, has_8255: 0, }, @@ -975,7 +987,7 @@ static ni_board ni_boards[]={ .ao_range_table = &range_ni_M_628x_ao, reg_type: ni_reg_628x, ao_unipolar: 1, -// ao_speed: 357, + ao_speed: 357, .caldac = {caldac_none}, has_8255: 0, }, @@ -1007,7 +1019,7 @@ static ni_board ni_boards[]={ .ao_range_table = &range_ni_M_628x_ao, reg_type: ni_reg_628x, ao_unipolar: 1, -// ao_speed: 357, + ao_speed: 357, .caldac = {caldac_none}, has_8255: 0, }, diff --git a/comedi/drivers/ni_stc.h b/comedi/drivers/ni_stc.h index 86699b46..bd935a5f 100644 --- a/comedi/drivers/ni_stc.h +++ b/comedi/drivers/ni_stc.h @@ -1261,6 +1261,7 @@ typedef struct ni_board_struct{ int ao_fifo_depth; comedi_lrange *ao_range_table; + unsigned ao_speed; int reg_type; -- 2.26.2