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

Go to the source code of this file.

Data Structures

struct  dt3k_boardtype
 
struct  dt3k_private
 

Macros

#define DEBUG   1
 
#define PCI_VENDOR_ID_DT   0x1116
 
#define this_board   ((const struct dt3k_boardtype *)dev->board_ptr)
 
#define DT3000_SIZE   (4*0x1000)
 
#define DPR_DAC_buffer   (4*0x000)
 
#define DPR_ADC_buffer   (4*0x800)
 
#define DPR_Command   (4*0xfd3)
 
#define DPR_SubSys   (4*0xfd3)
 
#define DPR_Encode   (4*0xfd4)
 
#define DPR_Params(a)   (4*(0xfd5+(a)))
 
#define DPR_Tick_Reg_Lo   (4*0xff5)
 
#define DPR_Tick_Reg_Hi   (4*0xff6)
 
#define DPR_DA_Buf_Front   (4*0xff7)
 
#define DPR_DA_Buf_Rear   (4*0xff8)
 
#define DPR_AD_Buf_Front   (4*0xff9)
 
#define DPR_AD_Buf_Rear   (4*0xffa)
 
#define DPR_Int_Mask   (4*0xffb)
 
#define DPR_Intr_Flag   (4*0xffc)
 
#define DPR_Response_Mbx   (4*0xffe)
 
#define DPR_Command_Mbx   (4*0xfff)
 
#define AI_FIFO_DEPTH   2003
 
#define AO_FIFO_DEPTH   2048
 
#define CMD_GETBRDINFO   0
 
#define CMD_CONFIG   1
 
#define CMD_GETCONFIG   2
 
#define CMD_START   3
 
#define CMD_STOP   4
 
#define CMD_READSINGLE   5
 
#define CMD_WRITESINGLE   6
 
#define CMD_CALCCLOCK   7
 
#define CMD_READEVENTS   8
 
#define CMD_WRITECTCTRL   16
 
#define CMD_READCTCTRL   17
 
#define CMD_WRITECT   18
 
#define CMD_READCT   19
 
#define CMD_WRITEDATA   32
 
#define CMD_READDATA   33
 
#define CMD_WRITEIO   34
 
#define CMD_READIO   35
 
#define CMD_WRITECODE   36
 
#define CMD_READCODE   37
 
#define CMD_EXECUTE   38
 
#define CMD_HALT   48
 
#define SUBS_AI   0
 
#define SUBS_AO   1
 
#define SUBS_DIN   2
 
#define SUBS_DOUT   3
 
#define SUBS_MEM   4
 
#define SUBS_CT   5
 
#define DT3000_CMDONE   0x80
 
#define DT3000_CTDONE   0x40
 
#define DT3000_DAHWERR   0x20
 
#define DT3000_DASWERR   0x10
 
#define DT3000_DAEMPTY   0x08
 
#define DT3000_ADHWERR   0x04
 
#define DT3000_ADSWERR   0x02
 
#define DT3000_ADFULL   0x01
 
#define DT3000_COMPLETION_MASK   0xff00
 
#define DT3000_COMMAND_MASK   0x00ff
 
#define DT3000_NOTPROCESSED   0x0000
 
#define DT3000_NOERROR   0x5500
 
#define DT3000_ERROR   0xaa00
 
#define DT3000_NOTSUPPORTED   0xff00
 
#define DT3000_EXTERNAL_CLOCK   1
 
#define DT3000_RISING_EDGE   2
 
#define TMODE_MASK   0x1c
 
#define DT3000_AD_TRIG_INTERNAL   (0<<2)
 
#define DT3000_AD_TRIG_EXTERNAL   (1<<2)
 
#define DT3000_AD_RETRIG_INTERNAL   (2<<2)
 
#define DT3000_AD_RETRIG_EXTERNAL   (3<<2)
 
#define DT3000_AD_EXTRETRIG   (4<<2)
 
#define DT3000_CHANNEL_MODE_SE   0
 
#define DT3000_CHANNEL_MODE_DI   1
 
#define devpriv   ((struct dt3k_private *)dev->private)
 
#define TIMEOUT   100
 

Functions

 MODULE_DEVICE_TABLE (pci, dt3000_pci_table)
 
 module_comedi_pci_driver (dt3000_driver, dt3000_pci_driver)
 
 MODULE_AUTHOR ("Comedi http://www.comedi.org")
 
 MODULE_DESCRIPTION ("Comedi low-level driver")
 
 MODULE_LICENSE ("GPL")
 

Macro Definition Documentation

#define AI_FIFO_DEPTH   2003

Definition at line 187 of file dt3000.c.

#define AO_FIFO_DEPTH   2048

Definition at line 188 of file dt3000.c.

#define CMD_CALCCLOCK   7

Definition at line 199 of file dt3000.c.

#define CMD_CONFIG   1

Definition at line 193 of file dt3000.c.

#define CMD_EXECUTE   38

Definition at line 211 of file dt3000.c.

#define CMD_GETBRDINFO   0

Definition at line 192 of file dt3000.c.

#define CMD_GETCONFIG   2

Definition at line 194 of file dt3000.c.

#define CMD_HALT   48

Definition at line 212 of file dt3000.c.

#define CMD_READCODE   37

Definition at line 210 of file dt3000.c.

#define CMD_READCT   19

Definition at line 204 of file dt3000.c.

#define CMD_READCTCTRL   17

Definition at line 202 of file dt3000.c.

#define CMD_READDATA   33

Definition at line 206 of file dt3000.c.

#define CMD_READEVENTS   8

Definition at line 200 of file dt3000.c.

#define CMD_READIO   35

Definition at line 208 of file dt3000.c.

#define CMD_READSINGLE   5

Definition at line 197 of file dt3000.c.

#define CMD_START   3

Definition at line 195 of file dt3000.c.

#define CMD_STOP   4

Definition at line 196 of file dt3000.c.

#define CMD_WRITECODE   36

Definition at line 209 of file dt3000.c.

#define CMD_WRITECT   18

Definition at line 203 of file dt3000.c.

#define CMD_WRITECTCTRL   16

Definition at line 201 of file dt3000.c.

#define CMD_WRITEDATA   32

Definition at line 205 of file dt3000.c.

#define CMD_WRITEIO   34

Definition at line 207 of file dt3000.c.

#define CMD_WRITESINGLE   6

Definition at line 198 of file dt3000.c.

#define DEBUG   1

Definition at line 60 of file dt3000.c.

#define devpriv   ((struct dt3k_private *)dev->private)

Definition at line 260 of file dt3000.c.

#define DPR_AD_Buf_Front   (4*0xff9)

Definition at line 180 of file dt3000.c.

#define DPR_AD_Buf_Rear   (4*0xffa)

Definition at line 181 of file dt3000.c.

#define DPR_ADC_buffer   (4*0x800)

Definition at line 171 of file dt3000.c.

#define DPR_Command   (4*0xfd3)

Definition at line 172 of file dt3000.c.

#define DPR_Command_Mbx   (4*0xfff)

Definition at line 185 of file dt3000.c.

#define DPR_DA_Buf_Front   (4*0xff7)

Definition at line 178 of file dt3000.c.

#define DPR_DA_Buf_Rear   (4*0xff8)

Definition at line 179 of file dt3000.c.

#define DPR_DAC_buffer   (4*0x000)

Definition at line 170 of file dt3000.c.

#define DPR_Encode   (4*0xfd4)

Definition at line 174 of file dt3000.c.

#define DPR_Int_Mask   (4*0xffb)

Definition at line 182 of file dt3000.c.

#define DPR_Intr_Flag   (4*0xffc)

Definition at line 183 of file dt3000.c.

#define DPR_Params (   a)    (4*(0xfd5+(a)))

Definition at line 175 of file dt3000.c.

#define DPR_Response_Mbx   (4*0xffe)

Definition at line 184 of file dt3000.c.

#define DPR_SubSys   (4*0xfd3)

Definition at line 173 of file dt3000.c.

#define DPR_Tick_Reg_Hi   (4*0xff6)

Definition at line 177 of file dt3000.c.

#define DPR_Tick_Reg_Lo   (4*0xff5)

Definition at line 176 of file dt3000.c.

#define DT3000_AD_EXTRETRIG   (4<<2)

Definition at line 247 of file dt3000.c.

#define DT3000_AD_RETRIG_EXTERNAL   (3<<2)

Definition at line 246 of file dt3000.c.

#define DT3000_AD_RETRIG_INTERNAL   (2<<2)

Definition at line 245 of file dt3000.c.

#define DT3000_AD_TRIG_EXTERNAL   (1<<2)

Definition at line 244 of file dt3000.c.

#define DT3000_AD_TRIG_INTERNAL   (0<<2)

Definition at line 243 of file dt3000.c.

#define DT3000_ADFULL   0x01

Definition at line 229 of file dt3000.c.

#define DT3000_ADHWERR   0x04

Definition at line 227 of file dt3000.c.

#define DT3000_ADSWERR   0x02

Definition at line 228 of file dt3000.c.

#define DT3000_CHANNEL_MODE_DI   1

Definition at line 250 of file dt3000.c.

#define DT3000_CHANNEL_MODE_SE   0

Definition at line 249 of file dt3000.c.

#define DT3000_CMDONE   0x80

Definition at line 222 of file dt3000.c.

#define DT3000_COMMAND_MASK   0x00ff

Definition at line 232 of file dt3000.c.

#define DT3000_COMPLETION_MASK   0xff00

Definition at line 231 of file dt3000.c.

#define DT3000_CTDONE   0x40

Definition at line 223 of file dt3000.c.

#define DT3000_DAEMPTY   0x08

Definition at line 226 of file dt3000.c.

#define DT3000_DAHWERR   0x20

Definition at line 224 of file dt3000.c.

#define DT3000_DASWERR   0x10

Definition at line 225 of file dt3000.c.

#define DT3000_ERROR   0xaa00

Definition at line 235 of file dt3000.c.

#define DT3000_EXTERNAL_CLOCK   1

Definition at line 238 of file dt3000.c.

#define DT3000_NOERROR   0x5500

Definition at line 234 of file dt3000.c.

#define DT3000_NOTPROCESSED   0x0000

Definition at line 233 of file dt3000.c.

#define DT3000_NOTSUPPORTED   0xff00

Definition at line 236 of file dt3000.c.

#define DT3000_RISING_EDGE   2

Definition at line 239 of file dt3000.c.

#define DT3000_SIZE   (4*0x1000)

Definition at line 166 of file dt3000.c.

#define PCI_VENDOR_ID_DT   0x1116

Definition at line 68 of file dt3000.c.

#define SUBS_AI   0

Definition at line 214 of file dt3000.c.

#define SUBS_AO   1

Definition at line 215 of file dt3000.c.

#define SUBS_CT   5

Definition at line 219 of file dt3000.c.

#define SUBS_DIN   2

Definition at line 216 of file dt3000.c.

#define SUBS_DOUT   3

Definition at line 217 of file dt3000.c.

#define SUBS_MEM   4

Definition at line 218 of file dt3000.c.

#define this_board   ((const struct dt3k_boardtype *)dev->board_ptr)

Definition at line 164 of file dt3000.c.

#define TIMEOUT   100

Definition at line 272 of file dt3000.c.

#define TMODE_MASK   0x1c

Definition at line 241 of file dt3000.c.

Function Documentation

MODULE_AUTHOR ( "Comedi http://www.comedi.org"  )
module_comedi_pci_driver ( dt3000_driver  ,
dt3000_pci_driver   
)
MODULE_DESCRIPTION ( "Comedi low-level driver )
MODULE_DEVICE_TABLE ( pci  ,
dt3000_pci_table   
)
MODULE_LICENSE ( "GPL"  )