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

Go to the source code of this file.

Data Structures

struct  me_board
 
struct  me_private_data
 

Macros

#define ME2600_FIRMWARE   "me2600_firmware.bin"
 
#define PCI_VENDOR_ID_MEILHAUS   0x1402
 
#define ME2000_DEVICE_ID   0x2000
 
#define ME2600_DEVICE_ID   0x2600
 
#define PLX_INTCSR   0x4C /* PLX interrupt status register */
 
#define XILINX_DOWNLOAD_RESET   0x42 /* Xilinx registers */
 
#define ME_CONTROL_1   0x0000 /* - | W */
 
#define INTERRUPT_ENABLE   (1<<15)
 
#define COUNTER_B_IRQ   (1<<12)
 
#define COUNTER_A_IRQ   (1<<11)
 
#define CHANLIST_READY_IRQ   (1<<10)
 
#define EXT_IRQ   (1<<9)
 
#define ADFIFO_HALFFULL_IRQ   (1<<8)
 
#define SCAN_COUNT_ENABLE   (1<<5)
 
#define SIMULTANEOUS_ENABLE   (1<<4)
 
#define TRIGGER_FALLING_EDGE   (1<<3)
 
#define CONTINUOUS_MODE   (1<<2)
 
#define DISABLE_ADC   (0<<0)
 
#define SOFTWARE_TRIGGERED_ADC   (1<<0)
 
#define SCAN_TRIGGERED_ADC   (2<<0)
 
#define EXT_TRIGGERED_ADC   (3<<0)
 
#define ME_ADC_START   0x0000 /* R | - */
 
#define ME_CONTROL_2   0x0002 /* - | W */
 
#define ENABLE_ADFIFO   (1<<10)
 
#define ENABLE_CHANLIST   (1<<9)
 
#define ENABLE_PORT_B   (1<<7)
 
#define ENABLE_PORT_A   (1<<6)
 
#define ENABLE_COUNTER_B   (1<<4)
 
#define ENABLE_COUNTER_A   (1<<3)
 
#define ENABLE_DAC   (1<<1)
 
#define BUFFERED_DAC   (1<<0)
 
#define ME_DAC_UPDATE   0x0002 /* R | - */
 
#define ME_STATUS   0x0004 /* R | - */
 
#define COUNTER_B_IRQ_PENDING   (1<<12)
 
#define COUNTER_A_IRQ_PENDING   (1<<11)
 
#define CHANLIST_READY_IRQ_PENDING   (1<<10)
 
#define EXT_IRQ_PENDING   (1<<9)
 
#define ADFIFO_HALFFULL_IRQ_PENDING   (1<<8)
 
#define ADFIFO_FULL   (1<<4)
 
#define ADFIFO_HALFFULL   (1<<3)
 
#define ADFIFO_EMPTY   (1<<2)
 
#define CHANLIST_FULL   (1<<1)
 
#define FST_ACTIVE   (1<<0)
 
#define ME_RESET_INTERRUPT   0x0004 /* - | W */
 
#define ME_DIO_PORT_A   0x0006 /* R | W */
 
#define ME_DIO_PORT_B   0x0008 /* R | W */
 
#define ME_TIMER_DATA_0   0x000A /* - | W */
 
#define ME_TIMER_DATA_1   0x000C /* - | W */
 
#define ME_TIMER_DATA_2   0x000E /* - | W */
 
#define ME_CHANNEL_LIST   0x0010 /* - | W */
 
#define ADC_UNIPOLAR   (1<<6)
 
#define ADC_GAIN_0   (0<<4)
 
#define ADC_GAIN_1   (1<<4)
 
#define ADC_GAIN_2   (2<<4)
 
#define ADC_GAIN_3   (3<<4)
 
#define ME_READ_AD_FIFO   0x0010 /* R | - */
 
#define ME_DAC_CONTROL   0x0012 /* - | W */
 
#define DAC_UNIPOLAR_D   (0<<4)
 
#define DAC_BIPOLAR_D   (1<<4)
 
#define DAC_UNIPOLAR_C   (0<<5)
 
#define DAC_BIPOLAR_C   (1<<5)
 
#define DAC_UNIPOLAR_B   (0<<6)
 
#define DAC_BIPOLAR_B   (1<<6)
 
#define DAC_UNIPOLAR_A   (0<<7)
 
#define DAC_BIPOLAR_A   (1<<7)
 
#define DAC_GAIN_0_D   (0<<8)
 
#define DAC_GAIN_1_D   (1<<8)
 
#define DAC_GAIN_0_C   (0<<9)
 
#define DAC_GAIN_1_C   (1<<9)
 
#define DAC_GAIN_0_B   (0<<10)
 
#define DAC_GAIN_1_B   (1<<10)
 
#define DAC_GAIN_0_A   (0<<11)
 
#define DAC_GAIN_1_A   (1<<11)
 
#define ME_DAC_CONTROL_UPDATE   0x0012 /* R | - */
 
#define ME_DAC_DATA_A   0x0014 /* - | W */
 
#define ME_DAC_DATA_B   0x0016 /* - | W */
 
#define ME_DAC_DATA_C   0x0018 /* - | W */
 
#define ME_DAC_DATA_D   0x001A /* - | W */
 
#define ME_COUNTER_ENDDATA_A   0x001C /* - | W */
 
#define ME_COUNTER_ENDDATA_B   0x001E /* - | W */
 
#define ME_COUNTER_STARTDATA_A   0x0020 /* - | W */
 
#define ME_COUNTER_VALUE_A   0x0020 /* R | - */
 
#define ME_COUNTER_STARTDATA_B   0x0022 /* - | W */
 
#define ME_COUNTER_VALUE_B   0x0022 /* R | - */
 
#define dev_private   ((struct me_private_data *)dev->private)
 

Functions

 MODULE_DEVICE_TABLE (pci, me_daq_pci_table)
 
 module_comedi_pci_driver (me_daq_driver, me_daq_pci_driver)
 
 MODULE_AUTHOR ("Comedi http://www.comedi.org")
 
 MODULE_DESCRIPTION ("Comedi low-level driver")
 
 MODULE_LICENSE ("GPL")
 
 MODULE_FIRMWARE (ME2600_FIRMWARE)
 

Macro Definition Documentation

#define ADC_GAIN_0   (0<<4)

Definition at line 105 of file me_daq.c.

#define ADC_GAIN_1   (1<<4)

Definition at line 106 of file me_daq.c.

#define ADC_GAIN_2   (2<<4)

Definition at line 107 of file me_daq.c.

#define ADC_GAIN_3   (3<<4)

Definition at line 108 of file me_daq.c.

#define ADC_UNIPOLAR   (1<<6)

Definition at line 104 of file me_daq.c.

#define ADFIFO_EMPTY   (1<<2)

Definition at line 94 of file me_daq.c.

#define ADFIFO_FULL   (1<<4)

Definition at line 92 of file me_daq.c.

#define ADFIFO_HALFFULL   (1<<3)

Definition at line 93 of file me_daq.c.

#define ADFIFO_HALFFULL_IRQ   (1<<8)

Definition at line 66 of file me_daq.c.

#define ADFIFO_HALFFULL_IRQ_PENDING   (1<<8)

Definition at line 91 of file me_daq.c.

#define BUFFERED_DAC   (1<<0)

Definition at line 84 of file me_daq.c.

#define CHANLIST_FULL   (1<<1)

Definition at line 95 of file me_daq.c.

#define CHANLIST_READY_IRQ   (1<<10)

Definition at line 64 of file me_daq.c.

#define CHANLIST_READY_IRQ_PENDING   (1<<10)

Definition at line 89 of file me_daq.c.

#define CONTINUOUS_MODE   (1<<2)

Definition at line 70 of file me_daq.c.

#define COUNTER_A_IRQ   (1<<11)

Definition at line 63 of file me_daq.c.

#define COUNTER_A_IRQ_PENDING   (1<<11)

Definition at line 88 of file me_daq.c.

#define COUNTER_B_IRQ   (1<<12)

Definition at line 62 of file me_daq.c.

#define COUNTER_B_IRQ_PENDING   (1<<12)

Definition at line 87 of file me_daq.c.

#define DAC_BIPOLAR_A   (1<<7)

Definition at line 118 of file me_daq.c.

#define DAC_BIPOLAR_B   (1<<6)

Definition at line 116 of file me_daq.c.

#define DAC_BIPOLAR_C   (1<<5)

Definition at line 114 of file me_daq.c.

#define DAC_BIPOLAR_D   (1<<4)

Definition at line 112 of file me_daq.c.

#define DAC_GAIN_0_A   (0<<11)

Definition at line 125 of file me_daq.c.

#define DAC_GAIN_0_B   (0<<10)

Definition at line 123 of file me_daq.c.

#define DAC_GAIN_0_C   (0<<9)

Definition at line 121 of file me_daq.c.

#define DAC_GAIN_0_D   (0<<8)

Definition at line 119 of file me_daq.c.

#define DAC_GAIN_1_A   (1<<11)

Definition at line 126 of file me_daq.c.

#define DAC_GAIN_1_B   (1<<10)

Definition at line 124 of file me_daq.c.

#define DAC_GAIN_1_C   (1<<9)

Definition at line 122 of file me_daq.c.

#define DAC_GAIN_1_D   (1<<8)

Definition at line 120 of file me_daq.c.

#define DAC_UNIPOLAR_A   (0<<7)

Definition at line 117 of file me_daq.c.

#define DAC_UNIPOLAR_B   (0<<6)

Definition at line 115 of file me_daq.c.

#define DAC_UNIPOLAR_C   (0<<5)

Definition at line 113 of file me_daq.c.

#define DAC_UNIPOLAR_D   (0<<4)

Definition at line 111 of file me_daq.c.

#define dev_private   ((struct me_private_data *)dev->private)

Definition at line 237 of file me_daq.c.

#define DISABLE_ADC   (0<<0)

Definition at line 71 of file me_daq.c.

#define ENABLE_ADFIFO   (1<<10)

Definition at line 77 of file me_daq.c.

#define ENABLE_CHANLIST   (1<<9)

Definition at line 78 of file me_daq.c.

#define ENABLE_COUNTER_A   (1<<3)

Definition at line 82 of file me_daq.c.

#define ENABLE_COUNTER_B   (1<<4)

Definition at line 81 of file me_daq.c.

#define ENABLE_DAC   (1<<1)

Definition at line 83 of file me_daq.c.

#define ENABLE_PORT_A   (1<<6)

Definition at line 80 of file me_daq.c.

#define ENABLE_PORT_B   (1<<7)

Definition at line 79 of file me_daq.c.

#define EXT_IRQ   (1<<9)

Definition at line 65 of file me_daq.c.

#define EXT_IRQ_PENDING   (1<<9)

Definition at line 90 of file me_daq.c.

#define EXT_TRIGGERED_ADC   (3<<0)

Definition at line 74 of file me_daq.c.

#define FST_ACTIVE   (1<<0)

Definition at line 96 of file me_daq.c.

#define INTERRUPT_ENABLE   (1<<15)

Definition at line 61 of file me_daq.c.

#define ME2000_DEVICE_ID   0x2000

Definition at line 54 of file me_daq.c.

#define ME2600_DEVICE_ID   0x2600

Definition at line 55 of file me_daq.c.

#define ME2600_FIRMWARE   "me2600_firmware.bin"

Definition at line 51 of file me_daq.c.

#define ME_ADC_START   0x0000 /* R | - */

Definition at line 75 of file me_daq.c.

#define ME_CHANNEL_LIST   0x0010 /* - | W */

Definition at line 103 of file me_daq.c.

#define ME_CONTROL_1   0x0000 /* - | W */

Definition at line 60 of file me_daq.c.

#define ME_CONTROL_2   0x0002 /* - | W */

Definition at line 76 of file me_daq.c.

#define ME_COUNTER_ENDDATA_A   0x001C /* - | W */

Definition at line 132 of file me_daq.c.

#define ME_COUNTER_ENDDATA_B   0x001E /* - | W */

Definition at line 133 of file me_daq.c.

#define ME_COUNTER_STARTDATA_A   0x0020 /* - | W */

Definition at line 134 of file me_daq.c.

#define ME_COUNTER_STARTDATA_B   0x0022 /* - | W */

Definition at line 136 of file me_daq.c.

#define ME_COUNTER_VALUE_A   0x0020 /* R | - */

Definition at line 135 of file me_daq.c.

#define ME_COUNTER_VALUE_B   0x0022 /* R | - */

Definition at line 137 of file me_daq.c.

#define ME_DAC_CONTROL   0x0012 /* - | W */

Definition at line 110 of file me_daq.c.

#define ME_DAC_CONTROL_UPDATE   0x0012 /* R | - */

Definition at line 127 of file me_daq.c.

#define ME_DAC_DATA_A   0x0014 /* - | W */

Definition at line 128 of file me_daq.c.

#define ME_DAC_DATA_B   0x0016 /* - | W */

Definition at line 129 of file me_daq.c.

#define ME_DAC_DATA_C   0x0018 /* - | W */

Definition at line 130 of file me_daq.c.

#define ME_DAC_DATA_D   0x001A /* - | W */

Definition at line 131 of file me_daq.c.

#define ME_DAC_UPDATE   0x0002 /* R | - */

Definition at line 85 of file me_daq.c.

#define ME_DIO_PORT_A   0x0006 /* R | W */

Definition at line 98 of file me_daq.c.

#define ME_DIO_PORT_B   0x0008 /* R | W */

Definition at line 99 of file me_daq.c.

#define ME_READ_AD_FIFO   0x0010 /* R | - */

Definition at line 109 of file me_daq.c.

#define ME_RESET_INTERRUPT   0x0004 /* - | W */

Definition at line 97 of file me_daq.c.

#define ME_STATUS   0x0004 /* R | - */

Definition at line 86 of file me_daq.c.

#define ME_TIMER_DATA_0   0x000A /* - | W */

Definition at line 100 of file me_daq.c.

#define ME_TIMER_DATA_1   0x000C /* - | W */

Definition at line 101 of file me_daq.c.

#define ME_TIMER_DATA_2   0x000E /* - | W */

Definition at line 102 of file me_daq.c.

#define PCI_VENDOR_ID_MEILHAUS   0x1402

Definition at line 53 of file me_daq.c.

#define PLX_INTCSR   0x4C /* PLX interrupt status register */

Definition at line 57 of file me_daq.c.

#define SCAN_COUNT_ENABLE   (1<<5)

Definition at line 67 of file me_daq.c.

#define SCAN_TRIGGERED_ADC   (2<<0)

Definition at line 73 of file me_daq.c.

#define SIMULTANEOUS_ENABLE   (1<<4)

Definition at line 68 of file me_daq.c.

#define SOFTWARE_TRIGGERED_ADC   (1<<0)

Definition at line 72 of file me_daq.c.

#define TRIGGER_FALLING_EDGE   (1<<3)

Definition at line 69 of file me_daq.c.

#define XILINX_DOWNLOAD_RESET   0x42 /* Xilinx registers */

Definition at line 58 of file me_daq.c.

Function Documentation

MODULE_AUTHOR ( "Comedi http://www.comedi.org"  )
module_comedi_pci_driver ( me_daq_driver  ,
me_daq_pci_driver   
)
MODULE_DESCRIPTION ( "Comedi low-level driver )
MODULE_DEVICE_TABLE ( pci  ,
me_daq_pci_table   
)
MODULE_FIRMWARE ( ME2600_FIRMWARE  )
MODULE_LICENSE ( "GPL"  )