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

Go to the source code of this file.

Macros

#define DRV_NAME   "das08"
 
#define DO_ISA   IS_ENABLED(CONFIG_COMEDI_DAS08_ISA)
 
#define DO_PCI   IS_ENABLED(CONFIG_COMEDI_DAS08_PCI)
 
#define DO_COMEDI_DRIVER_REGISTER   (DO_ISA || DO_PCI)
 
#define PCI_VENDOR_ID_COMPUTERBOARDS   0x1307
 
#define PCI_DEVICE_ID_PCIDAS08   0x29
 
#define PCIDAS08_SIZE   0x54
 
#define INTCSR   0x4c
 
#define INTR1_ENABLE   0x1
 
#define INTR1_HIGH_POLARITY   0x2
 
#define PCI_INTR_ENABLE   0x40
 
#define INTR1_EDGE_TRIG   0x100 /* requires high polarity */
 
#define CNTRL   0x50
 
#define CNTRL_DIR   0x2
 
#define CNTRL_INTR   0x4
 
#define DAS08_LSB   0
 
#define DAS08_MSB   1
 
#define DAS08_TRIG_12BIT   1
 
#define DAS08_STATUS   2
 
#define DAS08_EOC   (1<<7)
 
#define DAS08_IRQ   (1<<3)
 
#define DAS08_IP(x)   (((x)>>4)&0x7)
 
#define DAS08_CONTROL   2
 
#define DAS08_MUX_MASK   0x7
 
#define DAS08_MUX(x)   ((x) & DAS08_MUX_MASK)
 
#define DAS08_INTE   (1<<3)
 
#define DAS08_DO_MASK   0xf0
 
#define DAS08_OP(x)   (((x) << 4) & DAS08_DO_MASK)
 
#define DAS08JR_DIO   3
 
#define DAS08JR_AO_LSB(x)   ((x) ? 6 : 4)
 
#define DAS08JR_AO_MSB(x)   ((x) ? 7 : 5)
 
#define DAS08AO_GAIN_CONTROL   3
 
#define DAS08AO_GAIN_STATUS   3
 
#define DAS08AO_AO_LSB(x)   ((x) ? 0xa : 8)
 
#define DAS08AO_AO_MSB(x)   ((x) ? 0xb : 9)
 
#define DAS08AO_AO_UPDATE   8
 
#define TIMEOUT   100000
 

Functions

int das08_common_attach (struct comedi_device *dev, unsigned long iobase)
 
 EXPORT_SYMBOL_GPL (das08_common_attach)
 
void das08_common_detach (struct comedi_device *dev)
 
 EXPORT_SYMBOL_GPL (das08_common_detach)
 
 module_init (das08_init)
 
 module_exit (das08_exit)
 
 MODULE_AUTHOR ("Comedi http://www.comedi.org")
 
 MODULE_DESCRIPTION ("Comedi low-level driver")
 
 MODULE_LICENSE ("GPL")
 

Macro Definition Documentation

#define CNTRL   0x50

Definition at line 78 of file das08.c.

#define CNTRL_DIR   0x2

Definition at line 79 of file das08.c.

#define CNTRL_INTR   0x4

Definition at line 80 of file das08.c.

#define DAS08_CONTROL   2

Definition at line 105 of file das08.c.

#define DAS08_DO_MASK   0xf0

Definition at line 109 of file das08.c.

#define DAS08_EOC   (1<<7)

Definition at line 102 of file das08.c.

#define DAS08_INTE   (1<<3)

Definition at line 108 of file das08.c.

#define DAS08_IP (   x)    (((x)>>4)&0x7)

Definition at line 104 of file das08.c.

#define DAS08_IRQ   (1<<3)

Definition at line 103 of file das08.c.

#define DAS08_LSB   0

Definition at line 98 of file das08.c.

#define DAS08_MSB   1

Definition at line 99 of file das08.c.

#define DAS08_MUX (   x)    ((x) & DAS08_MUX_MASK)

Definition at line 107 of file das08.c.

#define DAS08_MUX_MASK   0x7

Definition at line 106 of file das08.c.

#define DAS08_OP (   x)    (((x) << 4) & DAS08_DO_MASK)

Definition at line 110 of file das08.c.

#define DAS08_STATUS   2

Definition at line 101 of file das08.c.

#define DAS08_TRIG_12BIT   1

Definition at line 100 of file das08.c.

#define DAS08AO_AO_LSB (   x)    ((x) ? 0xa : 8)

Definition at line 155 of file das08.c.

#define DAS08AO_AO_MSB (   x)    ((x) ? 0xb : 9)

Definition at line 156 of file das08.c.

#define DAS08AO_AO_UPDATE   8

Definition at line 157 of file das08.c.

#define DAS08AO_GAIN_CONTROL   3

Definition at line 152 of file das08.c.

#define DAS08AO_GAIN_STATUS   3

Definition at line 153 of file das08.c.

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

Definition at line 129 of file das08.c.

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

Definition at line 130 of file das08.c.

#define DAS08JR_DIO   3

Definition at line 128 of file das08.c.

#define DO_COMEDI_DRIVER_REGISTER   (DO_ISA || DO_PCI)

Definition at line 66 of file das08.c.

#define DO_ISA   IS_ENABLED(CONFIG_COMEDI_DAS08_ISA)

Definition at line 64 of file das08.c.

#define DO_PCI   IS_ENABLED(CONFIG_COMEDI_DAS08_PCI)

Definition at line 65 of file das08.c.

#define DRV_NAME   "das08"

Definition at line 62 of file das08.c.

#define INTCSR   0x4c

Definition at line 73 of file das08.c.

#define INTR1_EDGE_TRIG   0x100 /* requires high polarity */

Definition at line 77 of file das08.c.

#define INTR1_ENABLE   0x1

Definition at line 74 of file das08.c.

#define INTR1_HIGH_POLARITY   0x2

Definition at line 75 of file das08.c.

#define PCI_DEVICE_ID_PCIDAS08   0x29

Definition at line 69 of file das08.c.

#define PCI_INTR_ENABLE   0x40

Definition at line 76 of file das08.c.

#define PCI_VENDOR_ID_COMPUTERBOARDS   0x1307

Definition at line 68 of file das08.c.

#define PCIDAS08_SIZE   0x54

Definition at line 70 of file das08.c.

#define TIMEOUT   100000

Definition at line 249 of file das08.c.

Function Documentation

int das08_common_attach ( struct comedi_device dev,
unsigned long  iobase 
)

Definition at line 658 of file das08.c.

void das08_common_detach ( struct comedi_device dev)

Definition at line 838 of file das08.c.

EXPORT_SYMBOL_GPL ( das08_common_attach  )
EXPORT_SYMBOL_GPL ( das08_common_detach  )
MODULE_AUTHOR ( "Comedi http://www.comedi.org"  )
MODULE_DESCRIPTION ( "Comedi low-level driver )
module_exit ( das08_exit  )
module_init ( das08_init  )
MODULE_LICENSE ( "GPL"  )