Linux Kernel
3.7.1
|
#include "../comedidev.h"
#include <linux/gfp.h>
#include <linux/ioport.h>
#include <linux/interrupt.h>
#include <linux/io.h>
#include <asm/dma.h>
#include "comedi_fc.h"
Go to the source code of this file.
Data Structures | |
struct | dt282x_board |
struct | dt282x_private |
Macros | |
#define | DEBUG |
#define | DT2821_TIMEOUT 100 /* 500 us */ |
#define | DT2821_SIZE 0x10 |
#define | DT2821_ADCSR 0x00 /* A/D Control/Status */ |
#define | DT2821_CHANCSR 0x02 /* Channel Control/Status */ |
#define | DT2821_ADDAT 0x04 /* A/D data */ |
#define | DT2821_DACSR 0x06 /* D/A Control/Status */ |
#define | DT2821_DADAT 0x08 /* D/A data */ |
#define | DT2821_DIODAT 0x0a /* digital data */ |
#define | DT2821_SUPCSR 0x0c /* Supervisor Control/Status */ |
#define | DT2821_TMRCTR 0x0e /* Timer/Counter */ |
#define | DT2821_ADCSR_MASK 0xfff0 |
#define | DT2821_ADCSR_VAL 0x7c00 |
#define | DT2821_CHANCSR_MASK 0xf0f0 |
#define | DT2821_CHANCSR_VAL 0x70f0 |
#define | DT2821_DACSR_MASK 0x7c93 |
#define | DT2821_DACSR_VAL 0x7c90 |
#define | DT2821_SUPCSR_MASK 0xf8ff |
#define | DT2821_SUPCSR_VAL 0x0000 |
#define | DT2821_TMRCTR_MASK 0xff00 |
#define | DT2821_TMRCTR_VAL 0xf000 |
#define | DT2821_ADERR 0x8000 /* (R) 1 for A/D error */ |
#define | DT2821_ADCLK 0x0200 /* (R/W) A/D clock enable */ |
#define | DT2821_MUXBUSY 0x0100 /* (R) multiplexer busy */ |
#define | DT2821_ADDONE 0x0080 /* (R) A/D done */ |
#define | DT2821_IADDONE 0x0040 /* (R/W) interrupt on A/D done */ |
#define | DT2821_LLE 0x8000 /* (R/W) Load List Enable */ |
#define | DT2821_DAERR 0x8000 /* (R) D/A error */ |
#define | DT2821_YSEL 0x0200 /* (R/W) DAC 1 select */ |
#define | DT2821_SSEL 0x0100 /* (R/W) single channel select */ |
#define | DT2821_DACRDY 0x0080 /* (R) DAC ready */ |
#define | DT2821_IDARDY 0x0040 /* (R/W) interrupt on DAC ready */ |
#define | DT2821_DACLK 0x0020 /* (R/W) D/A clock enable */ |
#define | DT2821_HBOE 0x0002 /* (R/W) DIO high byte output enable */ |
#define | DT2821_LBOE 0x0001 /* (R/W) DIO low byte output enable */ |
#define | DT2821_DMAD 0x8000 /* (R) DMA done */ |
#define | DT2821_ERRINTEN 0x4000 /* (R/W) interrupt on error */ |
#define | DT2821_CLRDMADNE 0x2000 /* (W) clear DMA done */ |
#define | DT2821_DDMA 0x1000 /* (R/W) dual DMA */ |
#define | DT2821_DS1 0x0800 /* (R/W) DMA select 1 */ |
#define | DT2821_DS0 0x0400 /* (R/W) DMA select 0 */ |
#define | DT2821_BUFFB 0x0200 /* (R/W) buffer B selected */ |
#define | DT2821_SCDN 0x0100 /* (R) scan done */ |
#define | DT2821_DACON 0x0080 /* (W) DAC single conversion */ |
#define | DT2821_ADCINIT 0x0040 /* (W) A/D initialize */ |
#define | DT2821_DACINIT 0x0020 /* (W) D/A initialize */ |
#define | DT2821_PRLD 0x0010 /* (W) preload multiplexer */ |
#define | DT2821_STRIG 0x0008 /* (W) software trigger */ |
#define | DT2821_XTRIG 0x0004 /* (R/W) external trigger enable */ |
#define | DT2821_XCLK 0x0002 /* (R/W) external clock enable */ |
#define | DT2821_BDINIT 0x0001 /* (W) initialize board */ |
#define | devpriv ((struct dt282x_private *)dev->private) |
#define | boardtype (*(const struct dt282x_board *)dev->board_ptr) |
#define | chan_to_DAC(a) ((a)&1) |
#define | mux_busy() (inw(dev->iobase+DT2821_ADCSR)&DT2821_MUXBUSY) |
#define | ad_done() (inw(dev->iobase+DT2821_ADCSR)&DT2821_ADDONE) |
#define | wait_for(a, b) |
#define | SLOWEST_TIMER (250*(1<<15)*255) |
Enumerations | |
enum | { opt_iobase = 0, opt_irq, opt_dma1, opt_dma2, opt_diff, opt_ai_twos, opt_ao0_twos, opt_ao1_twos, opt_ai_range, opt_ao0_range, opt_ao1_range } |
Functions | |
module_comedi_driver (dt282x_driver) | |
MODULE_AUTHOR ("Comedi http://www.comedi.org") | |
MODULE_DESCRIPTION ("Comedi low-level driver") | |
MODULE_LICENSE ("GPL") | |
#define ad_done | ( | ) | (inw(dev->iobase+DT2821_ADCSR)&DT2821_ADDONE) |
#define boardtype (*(const struct dt282x_board *)dev->board_ptr) |
#define devpriv ((struct dt282x_private *)dev->private) |
#define DT2821_DACON 0x0080 /* (W) DAC single conversion */ |
#define DT2821_ERRINTEN 0x4000 /* (R/W) interrupt on error */ |
#define DT2821_HBOE 0x0002 /* (R/W) DIO high byte output enable */ |
#define DT2821_IADDONE 0x0040 /* (R/W) interrupt on A/D done */ |
#define DT2821_IDARDY 0x0040 /* (R/W) interrupt on DAC ready */ |
#define DT2821_LBOE 0x0001 /* (R/W) DIO low byte output enable */ |
#define DT2821_SSEL 0x0100 /* (R/W) single channel select */ |
#define DT2821_XCLK 0x0002 /* (R/W) external clock enable */ |
#define DT2821_XTRIG 0x0004 /* (R/W) external trigger enable */ |
#define mux_busy | ( | ) | (inw(dev->iobase+DT2821_ADCSR)&DT2821_MUXBUSY) |
#define SLOWEST_TIMER (250*(1<<15)*255) |
anonymous enum |
MODULE_AUTHOR | ( | "Comedi http://www.comedi.org" | ) |
module_comedi_driver | ( | dt282x_driver | ) |
MODULE_LICENSE | ( | "GPL" | ) |