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

Go to the source code of this file.

Data Structures

struct  pci9111_private_data
 

Macros

#define PCI9111_DRIVER_NAME   "adl_pci9111"
 
#define PCI9111_HR_DEVICE_ID   0x9111
 
#define PCI9111_FIFO_HALF_SIZE   512
 
#define PCI9111_AI_ACQUISITION_PERIOD_MIN_NS   10000
 
#define PCI9111_RANGE_SETTING_DELAY   10
 
#define PCI9111_AI_INSTANT_READ_UDELAY_US   2
 
#define PCI9111_AI_INSTANT_READ_TIMEOUT   100
 
#define PCI9111_8254_CLOCK_PERIOD_NS   500
 
#define PCI9111_AI_FIFO_REG   0x00
 
#define PCI9111_AO_REG   0x00
 
#define PCI9111_DIO_REG   0x02
 
#define PCI9111_EDIO_REG   0x04
 
#define PCI9111_AI_CHANNEL_REG   0x06
 
#define PCI9111_AI_RANGE_STAT_REG   0x08
 
#define PCI9111_AI_STAT_AD_BUSY   (1 << 7)
 
#define PCI9111_AI_STAT_FF_FF   (1 << 6)
 
#define PCI9111_AI_STAT_FF_HF   (1 << 5)
 
#define PCI9111_AI_STAT_FF_EF   (1 << 4)
 
#define PCI9111_AI_RANGE_MASK   (7 << 0)
 
#define PCI9111_AI_TRIG_CTRL_REG   0x0a
 
#define PCI9111_AI_TRIG_CTRL_TRGEVENT   (1 << 5)
 
#define PCI9111_AI_TRIG_CTRL_POTRG   (1 << 4)
 
#define PCI9111_AI_TRIG_CTRL_PTRG   (1 << 3)
 
#define PCI9111_AI_TRIG_CTRL_ETIS   (1 << 2)
 
#define PCI9111_AI_TRIG_CTRL_TPST   (1 << 1)
 
#define PCI9111_AI_TRIG_CTRL_ASCAN   (1 << 0)
 
#define PCI9111_INT_CTRL_REG   0x0c
 
#define PCI9111_INT_CTRL_ISC2   (1 << 3)
 
#define PCI9111_INT_CTRL_FFEN   (1 << 2)
 
#define PCI9111_INT_CTRL_ISC1   (1 << 1)
 
#define PCI9111_INT_CTRL_ISC0   (1 << 0)
 
#define PCI9111_SOFT_TRIG_REG   0x0e
 
#define PCI9111_8254_BASE_REG   0x40
 
#define PCI9111_INT_CLR_REG   0x48
 
#define PLX9050_REGISTER_INTERRUPT_CONTROL   0x4c
 
#define PLX9050_LINTI1_ENABLE   (1 << 0)
 
#define PLX9050_LINTI1_ACTIVE_HIGH   (1 << 1)
 
#define PLX9050_LINTI1_STATUS   (1 << 2)
 
#define PLX9050_LINTI2_ENABLE   (1 << 3)
 
#define PLX9050_LINTI2_ACTIVE_HIGH   (1 << 4)
 
#define PLX9050_LINTI2_STATUS   (1 << 5)
 
#define PLX9050_PCI_INTERRUPT_ENABLE   (1 << 6)
 
#define PLX9050_SOFTWARE_INTERRUPT   (1 << 7)
 

Enumerations

enum  pci9111_trigger_sources { software, timer_pacer, external }
 
enum  pci9111_ISC0_sources { irq_on_eoc, irq_on_fifo_half_full }
 
enum  pci9111_ISC1_sources { irq_on_timer_tick, irq_on_external_trigger }
 

Functions

 MODULE_DEVICE_TABLE (pci, pci9111_pci_table)
 
 module_comedi_pci_driver (adl_pci9111_driver, adl_pci9111_pci_driver)
 
 MODULE_AUTHOR ("Comedi http://www.comedi.org")
 
 MODULE_DESCRIPTION ("Comedi low-level driver")
 
 MODULE_LICENSE ("GPL")
 

Macro Definition Documentation

#define PCI9111_8254_BASE_REG   0x40

Definition at line 119 of file adl_pci9111.c.

#define PCI9111_8254_CLOCK_PERIOD_NS   500

Definition at line 90 of file adl_pci9111.c.

#define PCI9111_AI_ACQUISITION_PERIOD_MIN_NS   10000

Definition at line 84 of file adl_pci9111.c.

#define PCI9111_AI_CHANNEL_REG   0x06

Definition at line 99 of file adl_pci9111.c.

#define PCI9111_AI_FIFO_REG   0x00

Definition at line 95 of file adl_pci9111.c.

#define PCI9111_AI_INSTANT_READ_TIMEOUT   100

Definition at line 88 of file adl_pci9111.c.

#define PCI9111_AI_INSTANT_READ_UDELAY_US   2

Definition at line 87 of file adl_pci9111.c.

#define PCI9111_AI_RANGE_MASK   (7 << 0)

Definition at line 105 of file adl_pci9111.c.

#define PCI9111_AI_RANGE_STAT_REG   0x08

Definition at line 100 of file adl_pci9111.c.

#define PCI9111_AI_STAT_AD_BUSY   (1 << 7)

Definition at line 101 of file adl_pci9111.c.

#define PCI9111_AI_STAT_FF_EF   (1 << 4)

Definition at line 104 of file adl_pci9111.c.

#define PCI9111_AI_STAT_FF_FF   (1 << 6)

Definition at line 102 of file adl_pci9111.c.

#define PCI9111_AI_STAT_FF_HF   (1 << 5)

Definition at line 103 of file adl_pci9111.c.

#define PCI9111_AI_TRIG_CTRL_ASCAN   (1 << 0)

Definition at line 112 of file adl_pci9111.c.

#define PCI9111_AI_TRIG_CTRL_ETIS   (1 << 2)

Definition at line 110 of file adl_pci9111.c.

#define PCI9111_AI_TRIG_CTRL_POTRG   (1 << 4)

Definition at line 108 of file adl_pci9111.c.

#define PCI9111_AI_TRIG_CTRL_PTRG   (1 << 3)

Definition at line 109 of file adl_pci9111.c.

#define PCI9111_AI_TRIG_CTRL_REG   0x0a

Definition at line 106 of file adl_pci9111.c.

#define PCI9111_AI_TRIG_CTRL_TPST   (1 << 1)

Definition at line 111 of file adl_pci9111.c.

#define PCI9111_AI_TRIG_CTRL_TRGEVENT   (1 << 5)

Definition at line 107 of file adl_pci9111.c.

#define PCI9111_AO_REG   0x00

Definition at line 96 of file adl_pci9111.c.

#define PCI9111_DIO_REG   0x02

Definition at line 97 of file adl_pci9111.c.

#define PCI9111_DRIVER_NAME   "adl_pci9111"

Definition at line 79 of file adl_pci9111.c.

#define PCI9111_EDIO_REG   0x04

Definition at line 98 of file adl_pci9111.c.

#define PCI9111_FIFO_HALF_SIZE   512

Definition at line 82 of file adl_pci9111.c.

#define PCI9111_HR_DEVICE_ID   0x9111

Definition at line 80 of file adl_pci9111.c.

#define PCI9111_INT_CLR_REG   0x48

Definition at line 120 of file adl_pci9111.c.

#define PCI9111_INT_CTRL_FFEN   (1 << 2)

Definition at line 115 of file adl_pci9111.c.

#define PCI9111_INT_CTRL_ISC0   (1 << 0)

Definition at line 117 of file adl_pci9111.c.

#define PCI9111_INT_CTRL_ISC1   (1 << 1)

Definition at line 116 of file adl_pci9111.c.

#define PCI9111_INT_CTRL_ISC2   (1 << 3)

Definition at line 114 of file adl_pci9111.c.

#define PCI9111_INT_CTRL_REG   0x0c

Definition at line 113 of file adl_pci9111.c.

#define PCI9111_RANGE_SETTING_DELAY   10

Definition at line 86 of file adl_pci9111.c.

#define PCI9111_SOFT_TRIG_REG   0x0e

Definition at line 118 of file adl_pci9111.c.

#define PLX9050_LINTI1_ACTIVE_HIGH   (1 << 1)

Definition at line 155 of file adl_pci9111.c.

#define PLX9050_LINTI1_ENABLE   (1 << 0)

Definition at line 154 of file adl_pci9111.c.

#define PLX9050_LINTI1_STATUS   (1 << 2)

Definition at line 156 of file adl_pci9111.c.

#define PLX9050_LINTI2_ACTIVE_HIGH   (1 << 4)

Definition at line 158 of file adl_pci9111.c.

#define PLX9050_LINTI2_ENABLE   (1 << 3)

Definition at line 157 of file adl_pci9111.c.

#define PLX9050_LINTI2_STATUS   (1 << 5)

Definition at line 159 of file adl_pci9111.c.

#define PLX9050_PCI_INTERRUPT_ENABLE   (1 << 6)

Definition at line 160 of file adl_pci9111.c.

#define PLX9050_REGISTER_INTERRUPT_CONTROL   0x4c

Definition at line 152 of file adl_pci9111.c.

#define PLX9050_SOFTWARE_INTERRUPT   (1 << 7)

Definition at line 161 of file adl_pci9111.c.

Enumeration Type Documentation

Enumerator:
irq_on_eoc 
irq_on_fifo_half_full 

Definition at line 264 of file adl_pci9111.c.

Enumerator:
irq_on_timer_tick 
irq_on_external_trigger 

Definition at line 269 of file adl_pci9111.c.

Enumerator:
software 
timer_pacer 
external 

Definition at line 202 of file adl_pci9111.c.

Function Documentation

MODULE_AUTHOR ( "Comedi http://www.comedi.org"  )
module_comedi_pci_driver ( adl_pci9111_driver  ,
adl_pci9111_pci_driver   
)
MODULE_DESCRIPTION ( "Comedi low-level driver )
MODULE_DEVICE_TABLE ( pci  ,
pci9111_pci_table   
)
MODULE_LICENSE ( "GPL"  )