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

Go to the source code of this file.

Data Structures

struct  rtdBoard
 
struct  rtdPrivate
 

Macros

#define DRV_NAME   "rtd520"
 
#define DMA_CHAIN_COUNT   2 /* max DMA segments/buffers in a ring (min 2) */
 
#define TRANS_TARGET_PERIOD   10000000 /* 10 ms (in nanoseconds) */
 
#define RTD_MAX_CHANLIST   128 /* max channel list that we allow */
 
#define WAIT_QUIETLY   udelay(1)
 
#define RTD_ADC_TIMEOUT   2000 /* in usec */
 
#define RTD_DAC_TIMEOUT   2000 /* in usec */
 
#define RTD_DMA_TIMEOUT   1000 /* in usec */
 
#define PCI_VENDOR_ID_RTD   0x1435
 
#define LCFG_PCIINDEX   0
 
#define LAS0_PCIINDEX   2 /* PCI memory resources */
 
#define LAS1_PCIINDEX   3
 
#define LCFG_PCISIZE   0x100
 
#define LAS0_PCISIZE   0x200
 
#define LAS1_PCISIZE   0x10
 
#define RTD_CLOCK_RATE   8000000 /* 8Mhz onboard clock */
 
#define RTD_CLOCK_BASE   125 /* clock period in ns */
 
#define RTD_MAX_SPEED   1625 /* when sampling, in nanoseconds */
 
#define RTD_MAX_SPEED_1   875 /* if single channel, in nanoseconds */
 
#define RTD_MIN_SPEED   2097151875 /* (24bit counter) in nanoseconds */
 
#define RTD_MIN_SPEED_1   5000000 /* 200Hz, in nanoseconds */
 
#define DMA_MODE_BITS
 
#define DMA_TRANSFER_BITS
 
#define SEND_EOS   0x01 /* send End Of Scan events */
 
#define DMA0_ACTIVE   0x02 /* DMA0 is active */
 
#define DMA1_ACTIVE   0x04 /* DMA1 is active */
 
#define CHAN_ARRAY_TEST(array, index)   (((array)[(index)/8] >> ((index) & 0x7)) & 0x1)
 
#define CHAN_ARRAY_SET(array, index)   (((array)[(index)/8] |= 1 << ((index) & 0x7)))
 
#define CHAN_ARRAY_CLEAR(array, index)   (((array)[(index)/8] &= ~(1 << ((index) & 0x7))))
 

Functions

 MODULE_DEVICE_TABLE (pci, rtd520_pci_table)
 
 module_comedi_pci_driver (rtd520_driver, rtd520_pci_driver)
 
 MODULE_AUTHOR ("Comedi http://www.comedi.org")
 
 MODULE_DESCRIPTION ("Comedi low-level driver")
 
 MODULE_LICENSE ("GPL")
 

Macro Definition Documentation

#define CHAN_ARRAY_CLEAR (   array,
  index 
)    (((array)[(index)/8] &= ~(1 << ((index) & 0x7))))

Definition at line 359 of file rtd520.c.

#define CHAN_ARRAY_SET (   array,
  index 
)    (((array)[(index)/8] |= 1 << ((index) & 0x7)))

Definition at line 357 of file rtd520.c.

#define CHAN_ARRAY_TEST (   array,
  index 
)    (((array)[(index)/8] >> ((index) & 0x7)) & 0x1)

Definition at line 355 of file rtd520.c.

#define DMA0_ACTIVE   0x02 /* DMA0 is active */

Definition at line 351 of file rtd520.c.

#define DMA1_ACTIVE   0x04 /* DMA1 is active */

Definition at line 352 of file rtd520.c.

#define DMA_CHAIN_COUNT   2 /* max DMA segments/buffers in a ring (min 2) */

Definition at line 121 of file rtd520.c.

#define DMA_MODE_BITS
Value:

Definition at line 180 of file rtd520.c.

#define DMA_TRANSFER_BITS
Value:
(\
/* descriptors in PCI memory*/ PLX_DESC_IN_PCI_BIT \
/* interrupt at end of block */ | PLX_INTR_TERM_COUNT \
/* from board to PCI */ | PLX_XFER_LOCAL_TO_PCI)

Definition at line 189 of file rtd520.c.

#define DRV_NAME   "rtd520"

Definition at line 111 of file rtd520.c.

#define LAS0_PCIINDEX   2 /* PCI memory resources */

Definition at line 158 of file rtd520.c.

#define LAS0_PCISIZE   0x200

Definition at line 161 of file rtd520.c.

#define LAS1_PCIINDEX   3

Definition at line 159 of file rtd520.c.

#define LAS1_PCISIZE   0x10

Definition at line 162 of file rtd520.c.

#define LCFG_PCIINDEX   0

Definition at line 156 of file rtd520.c.

#define LCFG_PCISIZE   0x100

Definition at line 160 of file rtd520.c.

#define PCI_VENDOR_ID_RTD   0x1435

Definition at line 151 of file rtd520.c.

#define RTD_ADC_TIMEOUT   2000 /* in usec */

Definition at line 141 of file rtd520.c.

#define RTD_CLOCK_BASE   125 /* clock period in ns */

Definition at line 165 of file rtd520.c.

#define RTD_CLOCK_RATE   8000000 /* 8Mhz onboard clock */

Definition at line 164 of file rtd520.c.

#define RTD_DAC_TIMEOUT   2000 /* in usec */

Definition at line 142 of file rtd520.c.

#define RTD_DMA_TIMEOUT   1000 /* in usec */

Definition at line 143 of file rtd520.c.

#define RTD_MAX_CHANLIST   128 /* max channel list that we allow */

Definition at line 130 of file rtd520.c.

#define RTD_MAX_SPEED   1625 /* when sampling, in nanoseconds */

Definition at line 168 of file rtd520.c.

#define RTD_MAX_SPEED_1   875 /* if single channel, in nanoseconds */

Definition at line 170 of file rtd520.c.

#define RTD_MIN_SPEED   2097151875 /* (24bit counter) in nanoseconds */

Definition at line 172 of file rtd520.c.

#define RTD_MIN_SPEED_1   5000000 /* 200Hz, in nanoseconds */

Definition at line 174 of file rtd520.c.

#define SEND_EOS   0x01 /* send End Of Scan events */

Definition at line 350 of file rtd520.c.

#define TRANS_TARGET_PERIOD   10000000 /* 10 ms (in nanoseconds) */

Definition at line 126 of file rtd520.c.

#define WAIT_QUIETLY   udelay(1)

Definition at line 140 of file rtd520.c.

Function Documentation

MODULE_AUTHOR ( "Comedi http://www.comedi.org"  )
module_comedi_pci_driver ( rtd520_driver  ,
rtd520_pci_driver   
)
MODULE_DESCRIPTION ( "Comedi low-level driver )
MODULE_DEVICE_TABLE ( pci  ,
rtd520_pci_table   
)
MODULE_LICENSE ( "GPL"  )