Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Data Structures | Macros | Enumerations | Functions
das16.c File Reference
#include <linux/pci.h>
#include <linux/slab.h>
#include <linux/interrupt.h>
#include <asm/dma.h>
#include "../comedidev.h"
#include "8253.h"
#include "8255.h"
#include "comedi_fc.h"

Go to the source code of this file.

Data Structures

struct  munge_info
 
struct  das16_board
 
struct  das16_private_struct
 

Macros

#define DEBUG_PRINT(format, args...)
 
#define DAS16_SIZE   20 /* number of ioports */
 
#define DAS16_DMA_SIZE   0xff00 /* size in bytes of allocated dma buffer */
 
#define DAS16_TRIG   0
 
#define DAS16_AI_LSB   0
 
#define DAS16_AI_MSB   1
 
#define DAS16_MUX   2
 
#define DAS16_DIO   3
 
#define DAS16_AO_LSB(x)   ((x) ? 6 : 4)
 
#define DAS16_AO_MSB(x)   ((x) ? 7 : 5)
 
#define DAS16_STATUS   8
 
#define BUSY   (1<<7)
 
#define UNIPOLAR   (1<<6)
 
#define DAS16_MUXBIT   (1<<5)
 
#define DAS16_INT   (1<<4)
 
#define DAS16_CONTROL   9
 
#define DAS16_INTE   (1<<7)
 
#define DAS16_IRQ(x)   (((x) & 0x7) << 4)
 
#define DMA_ENABLE   (1<<2)
 
#define PACING_MASK   0x3
 
#define INT_PACER   0x03
 
#define EXT_PACER   0x02
 
#define DAS16_SOFT   0x00
 
#define DAS16_PACER   0x0A
 
#define DAS16_CTR0   (1<<1)
 
#define DAS16_TRIG0   (1<<0)
 
#define BURST_LEN_BITS(x)   (((x) & 0xf) << 4)
 
#define DAS16_GAIN   0x0B
 
#define DAS16_CNTR0_DATA   0x0C
 
#define DAS16_CNTR1_DATA   0x0D
 
#define DAS16_CNTR2_DATA   0x0E
 
#define DAS16_CNTR_CONTROL   0x0F
 
#define DAS16_TERM_CNT   0x00
 
#define DAS16_ONE_SHOT   0x02
 
#define DAS16_RATE_GEN   0x04
 
#define DAS16_CNTR_LSB_MSB   0x30
 
#define DAS16_CNTR0   0x00
 
#define DAS16_CNTR1   0x40
 
#define DAS16_CNTR2   0x80
 
#define DAS1600_CONV   0x404
 
#define DAS1600_CONV_DISABLE   0x40
 
#define DAS1600_BURST   0x405
 
#define DAS1600_BURST_VAL   0x40
 
#define DAS1600_ENABLE   0x406
 
#define DAS1600_ENABLE_VAL   0x40
 
#define DAS1600_STATUS_B   0x407
 
#define DAS1600_BME   0x40
 
#define DAS1600_ME   0x20
 
#define DAS1600_CD   0x10
 
#define DAS1600_WS   0x02
 
#define DAS1600_CLK_10MHZ   0x01
 
#define DAS16_TIMEOUT   1000
 
#define devpriv   ((struct das16_private_struct *)(dev->private))
 

Enumerations

enum  {
  das16_pg_none = 0, das16_pg_16jr, das16_pg_16jr_16, das16_pg_1601,
  das16_pg_1602
}
 

Functions

 module_comedi_driver (das16_driver)
 
 MODULE_AUTHOR ("Comedi http://www.comedi.org")
 
 MODULE_DESCRIPTION ("Comedi low-level driver")
 
 MODULE_LICENSE ("GPL")
 

Macro Definition Documentation

#define BURST_LEN_BITS (   x)    (((x) & 0xf) << 4)

Definition at line 217 of file das16.c.

#define BUSY   (1<<7)

Definition at line 202 of file das16.c.

#define DAS1600_BME   0x40

Definition at line 238 of file das16.c.

#define DAS1600_BURST   0x405

Definition at line 233 of file das16.c.

#define DAS1600_BURST_VAL   0x40

Definition at line 234 of file das16.c.

#define DAS1600_CD   0x10

Definition at line 240 of file das16.c.

#define DAS1600_CLK_10MHZ   0x01

Definition at line 242 of file das16.c.

#define DAS1600_CONV   0x404

Definition at line 231 of file das16.c.

#define DAS1600_CONV_DISABLE   0x40

Definition at line 232 of file das16.c.

#define DAS1600_ENABLE   0x406

Definition at line 235 of file das16.c.

#define DAS1600_ENABLE_VAL   0x40

Definition at line 236 of file das16.c.

#define DAS1600_ME   0x20

Definition at line 239 of file das16.c.

#define DAS1600_STATUS_B   0x407

Definition at line 237 of file das16.c.

#define DAS1600_WS   0x02

Definition at line 241 of file das16.c.

#define DAS16_AI_LSB   0

Definition at line 195 of file das16.c.

#define DAS16_AI_MSB   1

Definition at line 196 of file das16.c.

#define DAS16_AO_LSB (   x)    ((x) ? 6 : 4)

Definition at line 199 of file das16.c.

#define DAS16_AO_MSB (   x)    ((x) ? 7 : 5)

Definition at line 200 of file das16.c.

#define DAS16_CNTR0   0x00

Definition at line 227 of file das16.c.

#define DAS16_CNTR0_DATA   0x0C

Definition at line 219 of file das16.c.

#define DAS16_CNTR1   0x40

Definition at line 228 of file das16.c.

#define DAS16_CNTR1_DATA   0x0D

Definition at line 220 of file das16.c.

#define DAS16_CNTR2   0x80

Definition at line 229 of file das16.c.

#define DAS16_CNTR2_DATA   0x0E

Definition at line 221 of file das16.c.

#define DAS16_CNTR_CONTROL   0x0F

Definition at line 222 of file das16.c.

#define DAS16_CNTR_LSB_MSB   0x30

Definition at line 226 of file das16.c.

#define DAS16_CONTROL   9

Definition at line 206 of file das16.c.

#define DAS16_CTR0   (1<<1)

Definition at line 215 of file das16.c.

#define DAS16_DIO   3

Definition at line 198 of file das16.c.

#define DAS16_DMA_SIZE   0xff00 /* size in bytes of allocated dma buffer */

Definition at line 103 of file das16.c.

#define DAS16_GAIN   0x0B

Definition at line 218 of file das16.c.

#define DAS16_INT   (1<<4)

Definition at line 205 of file das16.c.

#define DAS16_INTE   (1<<7)

Definition at line 207 of file das16.c.

#define DAS16_IRQ (   x)    (((x) & 0x7) << 4)

Definition at line 208 of file das16.c.

#define DAS16_MUX   2

Definition at line 197 of file das16.c.

#define DAS16_MUXBIT   (1<<5)

Definition at line 204 of file das16.c.

#define DAS16_ONE_SHOT   0x02

Definition at line 224 of file das16.c.

#define DAS16_PACER   0x0A

Definition at line 214 of file das16.c.

#define DAS16_RATE_GEN   0x04

Definition at line 225 of file das16.c.

#define DAS16_SIZE   20 /* number of ioports */

Definition at line 102 of file das16.c.

#define DAS16_SOFT   0x00

Definition at line 213 of file das16.c.

#define DAS16_STATUS   8

Definition at line 201 of file das16.c.

#define DAS16_TERM_CNT   0x00

Definition at line 223 of file das16.c.

#define DAS16_TIMEOUT   1000

Definition at line 360 of file das16.c.

#define DAS16_TRIG   0

Definition at line 194 of file das16.c.

#define DAS16_TRIG0   (1<<0)

Definition at line 216 of file das16.c.

#define DEBUG_PRINT (   format,
  args... 
)

Definition at line 99 of file das16.c.

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

Definition at line 395 of file das16.c.

#define DMA_ENABLE   (1<<2)

Definition at line 209 of file das16.c.

#define EXT_PACER   0x02

Definition at line 212 of file das16.c.

#define INT_PACER   0x03

Definition at line 211 of file das16.c.

#define PACING_MASK   0x3

Definition at line 210 of file das16.c.

#define UNIPOLAR   (1<<6)

Definition at line 203 of file das16.c.

Enumeration Type Documentation

anonymous enum
Enumerator:
das16_pg_none 
das16_pg_16jr 
das16_pg_16jr_16 
das16_pg_1601 
das16_pg_1602 

Definition at line 306 of file das16.c.

Function Documentation

MODULE_AUTHOR ( "Comedi http://www.comedi.org"  )
module_comedi_driver ( das16_driver  )
MODULE_DESCRIPTION ( "Comedi low-level driver )
MODULE_LICENSE ( "GPL"  )