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

Go to the source code of this file.

Data Structures

struct  skel_private
 

Macros

#define MPC624_SIZE   16
 
#define MPC624_MASTER_CONTROL   0 /* not used */
 
#define MPC624_GNMUXCH   1 /* Gain, Mux, Channel of ADC */
 
#define MPC624_ADC   2 /* read/write to/from ADC */
 
#define MPC624_EE   3 /* read/write to/from serial EEPROM via I2C */
 
#define MPC624_LEDS   4 /* write to LEDs */
 
#define MPC624_DIO   5 /* read/write to/from digital I/O ports */
 
#define MPC624_IRQ_MASK   6 /* IRQ masking enable/disable */
 
#define MPC624_ADBUSY   (1<<5)
 
#define MPC624_ADSDO   (1<<4)
 
#define MPC624_ADFO   (1<<3)
 
#define MPC624_ADCS   (1<<2)
 
#define MPC624_ADSCK   (1<<1)
 
#define MPC624_ADSDI   (1<<0)
 
#define MPC624_OSR4   (1<<31)
 
#define MPC624_OSR3   (1<<30)
 
#define MPC624_OSR2   (1<<29)
 
#define MPC624_OSR1   (1<<28)
 
#define MPC624_OSR0   (1<<27)
 
#define MPC624_EOC_BIT   (1<<31)
 
#define MPC624_DMY_BIT   (1<<30)
 
#define MPC624_SGN_BIT   (1<<29)
 
#define MPC624_SPEED_3_52_kHz   (MPC624_OSR4 | MPC624_OSR0)
 
#define MPC624_SPEED_1_76_kHz   (MPC624_OSR4 | MPC624_OSR1)
 
#define MPC624_SPEED_880_Hz   (MPC624_OSR4 | MPC624_OSR1 | MPC624_OSR0)
 
#define MPC624_SPEED_440_Hz   (MPC624_OSR4 | MPC624_OSR2)
 
#define MPC624_SPEED_220_Hz   (MPC624_OSR4 | MPC624_OSR2 | MPC624_OSR0)
 
#define MPC624_SPEED_110_Hz   (MPC624_OSR4 | MPC624_OSR2 | MPC624_OSR1)
 
#define MPC624_SPEED_55_Hz   (MPC624_OSR4 | MPC624_OSR2 | MPC624_OSR1 | MPC624_OSR0)
 
#define MPC624_SPEED_27_5_Hz   (MPC624_OSR4 | MPC624_OSR3)
 
#define MPC624_SPEED_13_75_Hz   (MPC624_OSR4 | MPC624_OSR3 | MPC624_OSR0)
 
#define MPC624_SPEED_6_875_Hz   (MPC624_OSR4 | MPC624_OSR3 | MPC624_OSR2 | MPC624_OSR1 | MPC624_OSR0)
 
#define devpriv   ((struct skel_private *)dev->private)
 
#define TIMEOUT   200
 

Functions

 module_comedi_driver (mpc624_driver)
 
 MODULE_AUTHOR ("Comedi http://www.comedi.org")
 
 MODULE_DESCRIPTION ("Comedi low-level driver")
 
 MODULE_LICENSE ("GPL")
 

Macro Definition Documentation

#define devpriv   ((struct skel_private *)dev->private)

Definition at line 131 of file mpc624.c.

#define MPC624_ADBUSY   (1<<5)

Definition at line 77 of file mpc624.c.

#define MPC624_ADC   2 /* read/write to/from ADC */

Definition at line 70 of file mpc624.c.

#define MPC624_ADCS   (1<<2)

Definition at line 80 of file mpc624.c.

#define MPC624_ADFO   (1<<3)

Definition at line 79 of file mpc624.c.

#define MPC624_ADSCK   (1<<1)

Definition at line 81 of file mpc624.c.

#define MPC624_ADSDI   (1<<0)

Definition at line 82 of file mpc624.c.

#define MPC624_ADSDO   (1<<4)

Definition at line 78 of file mpc624.c.

#define MPC624_DIO   5 /* read/write to/from digital I/O ports */

Definition at line 73 of file mpc624.c.

#define MPC624_DMY_BIT   (1<<30)

Definition at line 93 of file mpc624.c.

#define MPC624_EE   3 /* read/write to/from serial EEPROM via I2C */

Definition at line 71 of file mpc624.c.

#define MPC624_EOC_BIT   (1<<31)

Definition at line 92 of file mpc624.c.

#define MPC624_GNMUXCH   1 /* Gain, Mux, Channel of ADC */

Definition at line 69 of file mpc624.c.

#define MPC624_IRQ_MASK   6 /* IRQ masking enable/disable */

Definition at line 74 of file mpc624.c.

#define MPC624_LEDS   4 /* write to LEDs */

Definition at line 72 of file mpc624.c.

#define MPC624_MASTER_CONTROL   0 /* not used */

Definition at line 68 of file mpc624.c.

#define MPC624_OSR0   (1<<27)

Definition at line 89 of file mpc624.c.

#define MPC624_OSR1   (1<<28)

Definition at line 88 of file mpc624.c.

#define MPC624_OSR2   (1<<29)

Definition at line 87 of file mpc624.c.

#define MPC624_OSR3   (1<<30)

Definition at line 86 of file mpc624.c.

#define MPC624_OSR4   (1<<31)

Definition at line 85 of file mpc624.c.

#define MPC624_SGN_BIT   (1<<29)

Definition at line 94 of file mpc624.c.

#define MPC624_SIZE   16

Definition at line 65 of file mpc624.c.

#define MPC624_SPEED_110_Hz   (MPC624_OSR4 | MPC624_OSR2 | MPC624_OSR1)

Definition at line 117 of file mpc624.c.

#define MPC624_SPEED_13_75_Hz   (MPC624_OSR4 | MPC624_OSR3 | MPC624_OSR0)

Definition at line 121 of file mpc624.c.

#define MPC624_SPEED_1_76_kHz   (MPC624_OSR4 | MPC624_OSR1)

Definition at line 113 of file mpc624.c.

#define MPC624_SPEED_220_Hz   (MPC624_OSR4 | MPC624_OSR2 | MPC624_OSR0)

Definition at line 116 of file mpc624.c.

#define MPC624_SPEED_27_5_Hz   (MPC624_OSR4 | MPC624_OSR3)

Definition at line 120 of file mpc624.c.

#define MPC624_SPEED_3_52_kHz   (MPC624_OSR4 | MPC624_OSR0)

Definition at line 112 of file mpc624.c.

#define MPC624_SPEED_440_Hz   (MPC624_OSR4 | MPC624_OSR2)

Definition at line 115 of file mpc624.c.

#define MPC624_SPEED_55_Hz   (MPC624_OSR4 | MPC624_OSR2 | MPC624_OSR1 | MPC624_OSR0)

Definition at line 118 of file mpc624.c.

#define MPC624_SPEED_6_875_Hz   (MPC624_OSR4 | MPC624_OSR3 | MPC624_OSR2 | MPC624_OSR1 | MPC624_OSR0)

Definition at line 122 of file mpc624.c.

#define MPC624_SPEED_880_Hz   (MPC624_OSR4 | MPC624_OSR1 | MPC624_OSR0)

Definition at line 114 of file mpc624.c.

#define TIMEOUT   200

Definition at line 152 of file mpc624.c.

Function Documentation

MODULE_AUTHOR ( "Comedi http://www.comedi.org"  )
module_comedi_driver ( mpc624_driver  )
MODULE_DESCRIPTION ( "Comedi low-level driver )
MODULE_LICENSE ( "GPL"  )