Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Data Structures | Macros
quatech_daqp_cs.c File Reference
#include "../comedidev.h"
#include <linux/semaphore.h>
#include <pcmcia/cistpl.h>
#include <pcmcia/cisreg.h>
#include <pcmcia/ds.h>
#include <linux/completion.h>
#include "comedi_fc.h"

Go to the source code of this file.

Data Structures

struct  local_info_t
 

Macros

#define MAX_DEV   4
 
#define DAQP_FIFO_SIZE   4096
 
#define DAQP_FIFO   0
 
#define DAQP_SCANLIST   1
 
#define DAQP_CONTROL   2
 
#define DAQP_STATUS   2
 
#define DAQP_DIGITAL_IO   3
 
#define DAQP_PACER_LOW   4
 
#define DAQP_PACER_MID   5
 
#define DAQP_PACER_HIGH   6
 
#define DAQP_COMMAND   7
 
#define DAQP_DA   8
 
#define DAQP_TIMER   10
 
#define DAQP_AUX   15
 
#define DAQP_SCANLIST_DIFFERENTIAL   0x4000
 
#define DAQP_SCANLIST_GAIN(x)   ((x)<<12)
 
#define DAQP_SCANLIST_CHANNEL(x)   ((x)<<8)
 
#define DAQP_SCANLIST_START   0x0080
 
#define DAQP_SCANLIST_EXT_GAIN(x)   ((x)<<4)
 
#define DAQP_SCANLIST_EXT_CHANNEL(x)   (x)
 
#define DAQP_CONTROL_PACER_100kHz   0xc0
 
#define DAQP_CONTROL_PACER_1MHz   0x80
 
#define DAQP_CONTROL_PACER_5MHz   0x40
 
#define DAQP_CONTROL_PACER_EXTERNAL   0x00
 
#define DAQP_CONTORL_EXPANSION   0x20
 
#define DAQP_CONTROL_EOS_INT_ENABLE   0x10
 
#define DAQP_CONTROL_FIFO_INT_ENABLE   0x08
 
#define DAQP_CONTROL_TRIGGER_ONESHOT   0x00
 
#define DAQP_CONTROL_TRIGGER_CONTINUOUS   0x04
 
#define DAQP_CONTROL_TRIGGER_INTERNAL   0x00
 
#define DAQP_CONTROL_TRIGGER_EXTERNAL   0x02
 
#define DAQP_CONTROL_TRIGGER_RISING   0x00
 
#define DAQP_CONTROL_TRIGGER_FALLING   0x01
 
#define DAQP_STATUS_IDLE   0x80
 
#define DAQP_STATUS_RUNNING   0x40
 
#define DAQP_STATUS_EVENTS   0x38
 
#define DAQP_STATUS_DATA_LOST   0x20
 
#define DAQP_STATUS_END_OF_SCAN   0x10
 
#define DAQP_STATUS_FIFO_THRESHOLD   0x08
 
#define DAQP_STATUS_FIFO_FULL   0x04
 
#define DAQP_STATUS_FIFO_NEARFULL   0x02
 
#define DAQP_STATUS_FIFO_EMPTY   0x01
 
#define DAQP_COMMAND_ARM   0x80
 
#define DAQP_COMMAND_RSTF   0x40
 
#define DAQP_COMMAND_RSTQ   0x20
 
#define DAQP_COMMAND_STOP   0x10
 
#define DAQP_COMMAND_LATCH   0x08
 
#define DAQP_COMMAND_100kHz   0x00
 
#define DAQP_COMMAND_50kHz   0x02
 
#define DAQP_COMMAND_25kHz   0x04
 
#define DAQP_COMMAND_FIFO_DATA   0x01
 
#define DAQP_COMMAND_FIFO_PROGRAM   0x00
 
#define DAQP_AUX_TRIGGER_TTL   0x00
 
#define DAQP_AUX_TRIGGER_ANALOG   0x80
 
#define DAQP_AUX_TRIGGER_PRETRIGGER   0x40
 
#define DAQP_AUX_TIMER_INT_ENABLE   0x20
 
#define DAQP_AUX_TIMER_RELOAD   0x00
 
#define DAQP_AUX_TIMER_PAUSE   0x08
 
#define DAQP_AUX_TIMER_GO   0x10
 
#define DAQP_AUX_TIMER_GO_EXTERNAL   0x18
 
#define DAQP_AUX_TIMER_EXTERNAL_SRC   0x04
 
#define DAQP_AUX_TIMER_INTERNAL_SRC   0x00
 
#define DAQP_AUX_DA_DIRECT   0x00
 
#define DAQP_AUX_DA_OVERFLOW   0x01
 
#define DAQP_AUX_DA_EXTERNAL   0x02
 
#define DAQP_AUX_DA_PACER   0x03
 
#define DAQP_AUX_RUNNING   0x80
 
#define DAQP_AUX_TRIGGERED   0x40
 
#define DAQP_AUX_DA_BUFFER   0x20
 
#define DAQP_AUX_TIMER_OVERFLOW   0x10
 
#define DAQP_AUX_CONVERSION   0x08
 
#define DAQP_AUX_DATA_LOST   0x04
 
#define DAQP_AUX_FIFO_NEARFULL   0x02
 
#define DAQP_AUX_FIFO_EMPTY   0x01
 
#define MAX_SPEED   10000 /* 100 kHz - in nanoseconds */
 

Macro Definition Documentation

#define DAQP_AUX   15

Definition at line 98 of file quatech_daqp_cs.c.

#define DAQP_AUX_CONVERSION   0x08

Definition at line 161 of file quatech_daqp_cs.c.

#define DAQP_AUX_DA_BUFFER   0x20

Definition at line 159 of file quatech_daqp_cs.c.

#define DAQP_AUX_DA_DIRECT   0x00

Definition at line 152 of file quatech_daqp_cs.c.

#define DAQP_AUX_DA_EXTERNAL   0x02

Definition at line 154 of file quatech_daqp_cs.c.

#define DAQP_AUX_DA_OVERFLOW   0x01

Definition at line 153 of file quatech_daqp_cs.c.

#define DAQP_AUX_DA_PACER   0x03

Definition at line 155 of file quatech_daqp_cs.c.

#define DAQP_AUX_DATA_LOST   0x04

Definition at line 162 of file quatech_daqp_cs.c.

#define DAQP_AUX_FIFO_EMPTY   0x01

Definition at line 164 of file quatech_daqp_cs.c.

#define DAQP_AUX_FIFO_NEARFULL   0x02

Definition at line 163 of file quatech_daqp_cs.c.

#define DAQP_AUX_RUNNING   0x80

Definition at line 157 of file quatech_daqp_cs.c.

#define DAQP_AUX_TIMER_EXTERNAL_SRC   0x04

Definition at line 150 of file quatech_daqp_cs.c.

#define DAQP_AUX_TIMER_GO   0x10

Definition at line 148 of file quatech_daqp_cs.c.

#define DAQP_AUX_TIMER_GO_EXTERNAL   0x18

Definition at line 149 of file quatech_daqp_cs.c.

#define DAQP_AUX_TIMER_INT_ENABLE   0x20

Definition at line 145 of file quatech_daqp_cs.c.

#define DAQP_AUX_TIMER_INTERNAL_SRC   0x00

Definition at line 151 of file quatech_daqp_cs.c.

#define DAQP_AUX_TIMER_OVERFLOW   0x10

Definition at line 160 of file quatech_daqp_cs.c.

#define DAQP_AUX_TIMER_PAUSE   0x08

Definition at line 147 of file quatech_daqp_cs.c.

#define DAQP_AUX_TIMER_RELOAD   0x00

Definition at line 146 of file quatech_daqp_cs.c.

#define DAQP_AUX_TRIGGER_ANALOG   0x80

Definition at line 143 of file quatech_daqp_cs.c.

#define DAQP_AUX_TRIGGER_PRETRIGGER   0x40

Definition at line 144 of file quatech_daqp_cs.c.

#define DAQP_AUX_TRIGGER_TTL   0x00

Definition at line 142 of file quatech_daqp_cs.c.

#define DAQP_AUX_TRIGGERED   0x40

Definition at line 158 of file quatech_daqp_cs.c.

#define DAQP_COMMAND   7

Definition at line 95 of file quatech_daqp_cs.c.

#define DAQP_COMMAND_100kHz   0x00

Definition at line 136 of file quatech_daqp_cs.c.

#define DAQP_COMMAND_25kHz   0x04

Definition at line 138 of file quatech_daqp_cs.c.

#define DAQP_COMMAND_50kHz   0x02

Definition at line 137 of file quatech_daqp_cs.c.

#define DAQP_COMMAND_ARM   0x80

Definition at line 131 of file quatech_daqp_cs.c.

#define DAQP_COMMAND_FIFO_DATA   0x01

Definition at line 139 of file quatech_daqp_cs.c.

#define DAQP_COMMAND_FIFO_PROGRAM   0x00

Definition at line 140 of file quatech_daqp_cs.c.

#define DAQP_COMMAND_LATCH   0x08

Definition at line 135 of file quatech_daqp_cs.c.

#define DAQP_COMMAND_RSTF   0x40

Definition at line 132 of file quatech_daqp_cs.c.

#define DAQP_COMMAND_RSTQ   0x20

Definition at line 133 of file quatech_daqp_cs.c.

#define DAQP_COMMAND_STOP   0x10

Definition at line 134 of file quatech_daqp_cs.c.

#define DAQP_CONTORL_EXPANSION   0x20

Definition at line 111 of file quatech_daqp_cs.c.

#define DAQP_CONTROL   2

Definition at line 89 of file quatech_daqp_cs.c.

#define DAQP_CONTROL_EOS_INT_ENABLE   0x10

Definition at line 112 of file quatech_daqp_cs.c.

#define DAQP_CONTROL_FIFO_INT_ENABLE   0x08

Definition at line 113 of file quatech_daqp_cs.c.

#define DAQP_CONTROL_PACER_100kHz   0xc0

Definition at line 107 of file quatech_daqp_cs.c.

#define DAQP_CONTROL_PACER_1MHz   0x80

Definition at line 108 of file quatech_daqp_cs.c.

#define DAQP_CONTROL_PACER_5MHz   0x40

Definition at line 109 of file quatech_daqp_cs.c.

#define DAQP_CONTROL_PACER_EXTERNAL   0x00

Definition at line 110 of file quatech_daqp_cs.c.

#define DAQP_CONTROL_TRIGGER_CONTINUOUS   0x04

Definition at line 115 of file quatech_daqp_cs.c.

#define DAQP_CONTROL_TRIGGER_EXTERNAL   0x02

Definition at line 117 of file quatech_daqp_cs.c.

#define DAQP_CONTROL_TRIGGER_FALLING   0x01

Definition at line 119 of file quatech_daqp_cs.c.

#define DAQP_CONTROL_TRIGGER_INTERNAL   0x00

Definition at line 116 of file quatech_daqp_cs.c.

#define DAQP_CONTROL_TRIGGER_ONESHOT   0x00

Definition at line 114 of file quatech_daqp_cs.c.

#define DAQP_CONTROL_TRIGGER_RISING   0x00

Definition at line 118 of file quatech_daqp_cs.c.

#define DAQP_DA   8

Definition at line 96 of file quatech_daqp_cs.c.

#define DAQP_DIGITAL_IO   3

Definition at line 91 of file quatech_daqp_cs.c.

#define DAQP_FIFO   0

Definition at line 87 of file quatech_daqp_cs.c.

#define DAQP_FIFO_SIZE   4096

Definition at line 85 of file quatech_daqp_cs.c.

#define DAQP_PACER_HIGH   6

Definition at line 94 of file quatech_daqp_cs.c.

#define DAQP_PACER_LOW   4

Definition at line 92 of file quatech_daqp_cs.c.

#define DAQP_PACER_MID   5

Definition at line 93 of file quatech_daqp_cs.c.

#define DAQP_SCANLIST   1

Definition at line 88 of file quatech_daqp_cs.c.

#define DAQP_SCANLIST_CHANNEL (   x)    ((x)<<8)

Definition at line 102 of file quatech_daqp_cs.c.

#define DAQP_SCANLIST_DIFFERENTIAL   0x4000

Definition at line 100 of file quatech_daqp_cs.c.

#define DAQP_SCANLIST_EXT_CHANNEL (   x)    (x)

Definition at line 105 of file quatech_daqp_cs.c.

#define DAQP_SCANLIST_EXT_GAIN (   x)    ((x)<<4)

Definition at line 104 of file quatech_daqp_cs.c.

#define DAQP_SCANLIST_GAIN (   x)    ((x)<<12)

Definition at line 101 of file quatech_daqp_cs.c.

#define DAQP_SCANLIST_START   0x0080

Definition at line 103 of file quatech_daqp_cs.c.

#define DAQP_STATUS   2

Definition at line 90 of file quatech_daqp_cs.c.

#define DAQP_STATUS_DATA_LOST   0x20

Definition at line 124 of file quatech_daqp_cs.c.

#define DAQP_STATUS_END_OF_SCAN   0x10

Definition at line 125 of file quatech_daqp_cs.c.

#define DAQP_STATUS_EVENTS   0x38

Definition at line 123 of file quatech_daqp_cs.c.

#define DAQP_STATUS_FIFO_EMPTY   0x01

Definition at line 129 of file quatech_daqp_cs.c.

#define DAQP_STATUS_FIFO_FULL   0x04

Definition at line 127 of file quatech_daqp_cs.c.

#define DAQP_STATUS_FIFO_NEARFULL   0x02

Definition at line 128 of file quatech_daqp_cs.c.

#define DAQP_STATUS_FIFO_THRESHOLD   0x08

Definition at line 126 of file quatech_daqp_cs.c.

#define DAQP_STATUS_IDLE   0x80

Definition at line 121 of file quatech_daqp_cs.c.

#define DAQP_STATUS_RUNNING   0x40

Definition at line 122 of file quatech_daqp_cs.c.

#define DAQP_TIMER   10

Definition at line 97 of file quatech_daqp_cs.c.

#define MAX_DEV   4

Definition at line 62 of file quatech_daqp_cs.c.

#define MAX_SPEED   10000 /* 100 kHz - in nanoseconds */