Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Data Structures | Macros | Functions
daqboard2000.c File Reference
#include "../comedidev.h"
#include <linux/delay.h>
#include <linux/interrupt.h>
#include <linux/firmware.h>
#include "8255.h"

Go to the source code of this file.

Data Structures

struct  daq200_boardtype
 
struct  daqboard2000_private
 

Macros

#define DAQBOARD2000_FIRMWARE   "daqboard2000_firmware.bin"
 
#define PCI_VENDOR_ID_IOTECH   0x1616
 
#define DAQBOARD2000_SUBSYSTEM_IDS2   0x0002 /* Daqboard/2000 - 2 Dacs */
 
#define DAQBOARD2000_SUBSYSTEM_IDS4   0x0004 /* Daqboard/2000 - 4 Dacs */
 
#define DAQBOARD2000_SECRProgPinHi   0x8001767e
 
#define DAQBOARD2000_SECRProgPinLo   0x8000767e
 
#define DAQBOARD2000_SECRLocalBusHi   0xc000767e
 
#define DAQBOARD2000_SECRLocalBusLo   0x8000767e
 
#define DAQBOARD2000_SECRReloadHi   0xa000767e
 
#define DAQBOARD2000_SECRReloadLo   0x8000767e
 
#define DAQBOARD2000_EEPROM_PRESENT   0x10000000
 
#define DAQBOARD2000_CPLD_INIT   0x0002
 
#define DAQBOARD2000_CPLD_DONE   0x0004
 
#define acqControl   0x00 /* u16 */
 
#define acqScanListFIFO   0x02 /* u16 */
 
#define acqPacerClockDivLow   0x04 /* u32 */
 
#define acqScanCounter   0x08 /* u16 */
 
#define acqPacerClockDivHigh   0x0a /* u16 */
 
#define acqTriggerCount   0x0c /* u16 */
 
#define acqResultsFIFO   0x10 /* u16 */
 
#define acqResultsShadow   0x14 /* u16 */
 
#define acqAdcResult   0x18 /* u16 */
 
#define dacScanCounter   0x1c /* u16 */
 
#define dacControl   0x20 /* u16 */
 
#define dacFIFO   0x24 /* s16 */
 
#define dacPacerClockDiv   0x2a /* u16 */
 
#define refDacs   0x2c /* u16 */
 
#define dioControl   0x30 /* u16 */
 
#define dioP3hsioData   0x32 /* s16 */
 
#define dioP3Control   0x34 /* u16 */
 
#define calEepromControl   0x36 /* u16 */
 
#define dacSetting(x)   (0x38 + (x)*2) /* s16 */
 
#define dioP2ExpansionIO8Bit   0x40 /* s16 */
 
#define ctrTmrControl   0x80 /* u16 */
 
#define ctrInput(x)   (0x88 + (x)*2) /* s16 */
 
#define timerDivisor(x)   (0xa0 + (x)*2) /* u16 */
 
#define dmaControl   0xb0 /* u16 */
 
#define trigControl   0xb2 /* u16 */
 
#define calEeprom   0xb8 /* u16 */
 
#define acqDigitalMark   0xba /* u16 */
 
#define trigDacs   0xbc /* u16 */
 
#define dioP2ExpansionIO16Bit(x)   (0xc0 + (x)*2) /* s16 */
 
#define DAQBOARD2000_SeqStartScanList   0x0011
 
#define DAQBOARD2000_SeqStopScanList   0x0010
 
#define DAQBOARD2000_AcqResetScanListFifo   0x0004
 
#define DAQBOARD2000_AcqResetResultsFifo   0x0002
 
#define DAQBOARD2000_AcqResetConfigPipe   0x0001
 
#define DAQBOARD2000_AcqResultsFIFOMore1Sample   0x0001
 
#define DAQBOARD2000_AcqResultsFIFOHasValidData   0x0002
 
#define DAQBOARD2000_AcqResultsFIFOOverrun   0x0004
 
#define DAQBOARD2000_AcqLogicScanning   0x0008
 
#define DAQBOARD2000_AcqConfigPipeFull   0x0010
 
#define DAQBOARD2000_AcqScanListFIFOEmpty   0x0020
 
#define DAQBOARD2000_AcqAdcNotReady   0x0040
 
#define DAQBOARD2000_ArbitrationFailure   0x0080
 
#define DAQBOARD2000_AcqPacerOverrun   0x0100
 
#define DAQBOARD2000_DacPacerOverrun   0x0200
 
#define DAQBOARD2000_AcqHardwareError   0x01c0
 
#define DAQBOARD2000_SeqStartScanList   0x0011
 
#define DAQBOARD2000_SeqStopScanList   0x0010
 
#define DAQBOARD2000_AdcPacerInternal   0x0030
 
#define DAQBOARD2000_AdcPacerExternal   0x0032
 
#define DAQBOARD2000_AdcPacerEnable   0x0031
 
#define DAQBOARD2000_AdcPacerEnableDacPacer   0x0034
 
#define DAQBOARD2000_AdcPacerDisable   0x0030
 
#define DAQBOARD2000_AdcPacerNormalMode   0x0060
 
#define DAQBOARD2000_AdcPacerCompatibilityMode   0x0061
 
#define DAQBOARD2000_AdcPacerInternalOutEnable   0x0008
 
#define DAQBOARD2000_AdcPacerExternalRising   0x0100
 
#define DAQBOARD2000_DacFull   0x0001
 
#define DAQBOARD2000_RefBusy   0x0002
 
#define DAQBOARD2000_TrgBusy   0x0004
 
#define DAQBOARD2000_CalBusy   0x0008
 
#define DAQBOARD2000_Dac0Busy   0x0010
 
#define DAQBOARD2000_Dac1Busy   0x0020
 
#define DAQBOARD2000_Dac2Busy   0x0040
 
#define DAQBOARD2000_Dac3Busy   0x0080
 
#define DAQBOARD2000_Dac0Enable   0x0021
 
#define DAQBOARD2000_Dac1Enable   0x0031
 
#define DAQBOARD2000_Dac2Enable   0x0041
 
#define DAQBOARD2000_Dac3Enable   0x0051
 
#define DAQBOARD2000_DacEnableBit   0x0001
 
#define DAQBOARD2000_Dac0Disable   0x0020
 
#define DAQBOARD2000_Dac1Disable   0x0030
 
#define DAQBOARD2000_Dac2Disable   0x0040
 
#define DAQBOARD2000_Dac3Disable   0x0050
 
#define DAQBOARD2000_DacResetFifo   0x0004
 
#define DAQBOARD2000_DacPatternDisable   0x0060
 
#define DAQBOARD2000_DacPatternEnable   0x0061
 
#define DAQBOARD2000_DacSelectSignedData   0x0002
 
#define DAQBOARD2000_DacSelectUnsignedData   0x0000
 
#define DAQBOARD2000_TrigAnalog   0x0000
 
#define DAQBOARD2000_TrigTTL   0x0010
 
#define DAQBOARD2000_TrigTransHiLo   0x0004
 
#define DAQBOARD2000_TrigTransLoHi   0x0000
 
#define DAQBOARD2000_TrigAbove   0x0000
 
#define DAQBOARD2000_TrigBelow   0x0004
 
#define DAQBOARD2000_TrigLevelSense   0x0002
 
#define DAQBOARD2000_TrigEdgeSense   0x0000
 
#define DAQBOARD2000_TrigEnable   0x0001
 
#define DAQBOARD2000_TrigDisable   0x0000
 
#define DAQBOARD2000_PosRefDacSelect   0x0100
 
#define DAQBOARD2000_NegRefDacSelect   0x0000
 

Functions

 MODULE_DEVICE_TABLE (pci, daqboard2000_pci_table)
 
 module_comedi_pci_driver (daqboard2000_driver, daqboard2000_pci_driver)
 
 MODULE_AUTHOR ("Comedi http://www.comedi.org")
 
 MODULE_DESCRIPTION ("Comedi low-level driver")
 
 MODULE_LICENSE ("GPL")
 
 MODULE_FIRMWARE (DAQBOARD2000_FIRMWARE)
 

Macro Definition Documentation

#define acqAdcResult   0x18 /* u16 */

Definition at line 169 of file daqboard2000.c.

#define acqControl   0x00 /* u16 */

Definition at line 161 of file daqboard2000.c.

#define acqDigitalMark   0xba /* u16 */

Definition at line 187 of file daqboard2000.c.

#define acqPacerClockDivHigh   0x0a /* u16 */

Definition at line 165 of file daqboard2000.c.

#define acqPacerClockDivLow   0x04 /* u32 */

Definition at line 163 of file daqboard2000.c.

#define acqResultsFIFO   0x10 /* u16 */

Definition at line 167 of file daqboard2000.c.

#define acqResultsShadow   0x14 /* u16 */

Definition at line 168 of file daqboard2000.c.

#define acqScanCounter   0x08 /* u16 */

Definition at line 164 of file daqboard2000.c.

#define acqScanListFIFO   0x02 /* u16 */

Definition at line 162 of file daqboard2000.c.

#define acqTriggerCount   0x0c /* u16 */

Definition at line 166 of file daqboard2000.c.

#define calEeprom   0xb8 /* u16 */

Definition at line 186 of file daqboard2000.c.

#define calEepromControl   0x36 /* u16 */

Definition at line 178 of file daqboard2000.c.

#define ctrInput (   x)    (0x88 + (x)*2) /* s16 */

Definition at line 182 of file daqboard2000.c.

#define ctrTmrControl   0x80 /* u16 */

Definition at line 181 of file daqboard2000.c.

#define dacControl   0x20 /* u16 */

Definition at line 171 of file daqboard2000.c.

#define dacFIFO   0x24 /* s16 */

Definition at line 172 of file daqboard2000.c.

#define dacPacerClockDiv   0x2a /* u16 */

Definition at line 173 of file daqboard2000.c.

#define dacScanCounter   0x1c /* u16 */

Definition at line 170 of file daqboard2000.c.

#define dacSetting (   x)    (0x38 + (x)*2) /* s16 */

Definition at line 179 of file daqboard2000.c.

#define DAQBOARD2000_AcqAdcNotReady   0x0040

Definition at line 207 of file daqboard2000.c.

#define DAQBOARD2000_AcqConfigPipeFull   0x0010

Definition at line 205 of file daqboard2000.c.

#define DAQBOARD2000_AcqHardwareError   0x01c0

Definition at line 211 of file daqboard2000.c.

#define DAQBOARD2000_AcqLogicScanning   0x0008

Definition at line 204 of file daqboard2000.c.

#define DAQBOARD2000_AcqPacerOverrun   0x0100

Definition at line 209 of file daqboard2000.c.

#define DAQBOARD2000_AcqResetConfigPipe   0x0001

Definition at line 198 of file daqboard2000.c.

#define DAQBOARD2000_AcqResetResultsFifo   0x0002

Definition at line 197 of file daqboard2000.c.

#define DAQBOARD2000_AcqResetScanListFifo   0x0004

Definition at line 196 of file daqboard2000.c.

#define DAQBOARD2000_AcqResultsFIFOHasValidData   0x0002

Definition at line 202 of file daqboard2000.c.

#define DAQBOARD2000_AcqResultsFIFOMore1Sample   0x0001

Definition at line 201 of file daqboard2000.c.

#define DAQBOARD2000_AcqResultsFIFOOverrun   0x0004

Definition at line 203 of file daqboard2000.c.

#define DAQBOARD2000_AcqScanListFIFOEmpty   0x0020

Definition at line 206 of file daqboard2000.c.

#define DAQBOARD2000_AdcPacerCompatibilityMode   0x0061

Definition at line 224 of file daqboard2000.c.

#define DAQBOARD2000_AdcPacerDisable   0x0030

Definition at line 222 of file daqboard2000.c.

#define DAQBOARD2000_AdcPacerEnable   0x0031

Definition at line 220 of file daqboard2000.c.

#define DAQBOARD2000_AdcPacerEnableDacPacer   0x0034

Definition at line 221 of file daqboard2000.c.

#define DAQBOARD2000_AdcPacerExternal   0x0032

Definition at line 219 of file daqboard2000.c.

#define DAQBOARD2000_AdcPacerExternalRising   0x0100

Definition at line 226 of file daqboard2000.c.

#define DAQBOARD2000_AdcPacerInternal   0x0030

Definition at line 218 of file daqboard2000.c.

#define DAQBOARD2000_AdcPacerInternalOutEnable   0x0008

Definition at line 225 of file daqboard2000.c.

#define DAQBOARD2000_AdcPacerNormalMode   0x0060

Definition at line 223 of file daqboard2000.c.

#define DAQBOARD2000_ArbitrationFailure   0x0080

Definition at line 208 of file daqboard2000.c.

#define DAQBOARD2000_CalBusy   0x0008

Definition at line 232 of file daqboard2000.c.

#define DAQBOARD2000_CPLD_DONE   0x0004

Definition at line 138 of file daqboard2000.c.

#define DAQBOARD2000_CPLD_INIT   0x0002

Definition at line 137 of file daqboard2000.c.

#define DAQBOARD2000_Dac0Busy   0x0010

Definition at line 233 of file daqboard2000.c.

#define DAQBOARD2000_Dac0Disable   0x0020

Definition at line 244 of file daqboard2000.c.

#define DAQBOARD2000_Dac0Enable   0x0021

Definition at line 239 of file daqboard2000.c.

#define DAQBOARD2000_Dac1Busy   0x0020

Definition at line 234 of file daqboard2000.c.

#define DAQBOARD2000_Dac1Disable   0x0030

Definition at line 245 of file daqboard2000.c.

#define DAQBOARD2000_Dac1Enable   0x0031

Definition at line 240 of file daqboard2000.c.

#define DAQBOARD2000_Dac2Busy   0x0040

Definition at line 235 of file daqboard2000.c.

#define DAQBOARD2000_Dac2Disable   0x0040

Definition at line 246 of file daqboard2000.c.

#define DAQBOARD2000_Dac2Enable   0x0041

Definition at line 241 of file daqboard2000.c.

#define DAQBOARD2000_Dac3Busy   0x0080

Definition at line 236 of file daqboard2000.c.

#define DAQBOARD2000_Dac3Disable   0x0050

Definition at line 247 of file daqboard2000.c.

#define DAQBOARD2000_Dac3Enable   0x0051

Definition at line 242 of file daqboard2000.c.

#define DAQBOARD2000_DacEnableBit   0x0001

Definition at line 243 of file daqboard2000.c.

#define DAQBOARD2000_DacFull   0x0001

Definition at line 229 of file daqboard2000.c.

#define DAQBOARD2000_DacPacerOverrun   0x0200

Definition at line 210 of file daqboard2000.c.

#define DAQBOARD2000_DacPatternDisable   0x0060

Definition at line 249 of file daqboard2000.c.

#define DAQBOARD2000_DacPatternEnable   0x0061

Definition at line 250 of file daqboard2000.c.

#define DAQBOARD2000_DacResetFifo   0x0004

Definition at line 248 of file daqboard2000.c.

#define DAQBOARD2000_DacSelectSignedData   0x0002

Definition at line 251 of file daqboard2000.c.

#define DAQBOARD2000_DacSelectUnsignedData   0x0000

Definition at line 252 of file daqboard2000.c.

#define DAQBOARD2000_EEPROM_PRESENT   0x10000000

Definition at line 134 of file daqboard2000.c.

#define DAQBOARD2000_FIRMWARE   "daqboard2000_firmware.bin"

Definition at line 118 of file daqboard2000.c.

#define DAQBOARD2000_NegRefDacSelect   0x0000

Definition at line 268 of file daqboard2000.c.

#define DAQBOARD2000_PosRefDacSelect   0x0100

Definition at line 267 of file daqboard2000.c.

#define DAQBOARD2000_RefBusy   0x0002

Definition at line 230 of file daqboard2000.c.

#define DAQBOARD2000_SECRLocalBusHi   0xc000767e

Definition at line 128 of file daqboard2000.c.

#define DAQBOARD2000_SECRLocalBusLo   0x8000767e

Definition at line 129 of file daqboard2000.c.

#define DAQBOARD2000_SECRProgPinHi   0x8001767e

Definition at line 126 of file daqboard2000.c.

#define DAQBOARD2000_SECRProgPinLo   0x8000767e

Definition at line 127 of file daqboard2000.c.

#define DAQBOARD2000_SECRReloadHi   0xa000767e

Definition at line 130 of file daqboard2000.c.

#define DAQBOARD2000_SECRReloadLo   0x8000767e

Definition at line 131 of file daqboard2000.c.

#define DAQBOARD2000_SeqStartScanList   0x0011

Definition at line 214 of file daqboard2000.c.

#define DAQBOARD2000_SeqStartScanList   0x0011

Definition at line 214 of file daqboard2000.c.

#define DAQBOARD2000_SeqStopScanList   0x0010

Definition at line 215 of file daqboard2000.c.

#define DAQBOARD2000_SeqStopScanList   0x0010

Definition at line 215 of file daqboard2000.c.

#define DAQBOARD2000_SUBSYSTEM_IDS2   0x0002 /* Daqboard/2000 - 2 Dacs */

Definition at line 122 of file daqboard2000.c.

#define DAQBOARD2000_SUBSYSTEM_IDS4   0x0004 /* Daqboard/2000 - 4 Dacs */

Definition at line 123 of file daqboard2000.c.

#define DAQBOARD2000_TrgBusy   0x0004

Definition at line 231 of file daqboard2000.c.

#define DAQBOARD2000_TrigAbove   0x0000

Definition at line 259 of file daqboard2000.c.

#define DAQBOARD2000_TrigAnalog   0x0000

Definition at line 255 of file daqboard2000.c.

#define DAQBOARD2000_TrigBelow   0x0004

Definition at line 260 of file daqboard2000.c.

#define DAQBOARD2000_TrigDisable   0x0000

Definition at line 264 of file daqboard2000.c.

#define DAQBOARD2000_TrigEdgeSense   0x0000

Definition at line 262 of file daqboard2000.c.

#define DAQBOARD2000_TrigEnable   0x0001

Definition at line 263 of file daqboard2000.c.

#define DAQBOARD2000_TrigLevelSense   0x0002

Definition at line 261 of file daqboard2000.c.

#define DAQBOARD2000_TrigTransHiLo   0x0004

Definition at line 257 of file daqboard2000.c.

#define DAQBOARD2000_TrigTransLoHi   0x0000

Definition at line 258 of file daqboard2000.c.

#define DAQBOARD2000_TrigTTL   0x0010

Definition at line 256 of file daqboard2000.c.

#define dioControl   0x30 /* u16 */

Definition at line 175 of file daqboard2000.c.

#define dioP2ExpansionIO16Bit (   x)    (0xc0 + (x)*2) /* s16 */

Definition at line 189 of file daqboard2000.c.

#define dioP2ExpansionIO8Bit   0x40 /* s16 */

Definition at line 180 of file daqboard2000.c.

#define dioP3Control   0x34 /* u16 */

Definition at line 177 of file daqboard2000.c.

#define dioP3hsioData   0x32 /* s16 */

Definition at line 176 of file daqboard2000.c.

#define dmaControl   0xb0 /* u16 */

Definition at line 184 of file daqboard2000.c.

#define PCI_VENDOR_ID_IOTECH   0x1616

Definition at line 120 of file daqboard2000.c.

#define refDacs   0x2c /* u16 */

Definition at line 174 of file daqboard2000.c.

#define timerDivisor (   x)    (0xa0 + (x)*2) /* u16 */

Definition at line 183 of file daqboard2000.c.

#define trigControl   0xb2 /* u16 */

Definition at line 185 of file daqboard2000.c.

#define trigDacs   0xbc /* u16 */

Definition at line 188 of file daqboard2000.c.

Function Documentation

MODULE_AUTHOR ( "Comedi http://www.comedi.org"  )
module_comedi_pci_driver ( daqboard2000_driver  ,
daqboard2000_pci_driver   
)
MODULE_DESCRIPTION ( "Comedi low-level driver )
MODULE_DEVICE_TABLE ( pci  ,
daqboard2000_pci_table   
)
MODULE_FIRMWARE ( DAQBOARD2000_FIRMWARE  )
MODULE_LICENSE ( "GPL"  )