moved ni_private common stuff to .h
authorDavid Schleef <ds@schleef.org>
Tue, 5 Sep 2000 18:33:31 +0000 (18:33 +0000)
committerDavid Schleef <ds@schleef.org>
Tue, 5 Sep 2000 18:33:31 +0000 (18:33 +0000)
comedi/drivers/ni_atmio.c
comedi/drivers/ni_mio_cs.c
comedi/drivers/ni_pcimio.c
comedi/drivers/ni_stc.h

index da7e99b860a5247f5b063da6060b45440bc73bcd..f1408e255cde3cc209d6e86f9966618c490da603 100644 (file)
@@ -248,29 +248,7 @@ static int ni_irqpin[]={-1,-1,-1,0,1,2,-1,3,-1,-1,4,5,6,-1,-1,7};
 
 
 typedef struct{
-       int dio;
-       int ao0p,ao1p;
-       int lastchan;
-       int last_do;
-       int rt_irq;
-       int irqmask;
-       int aimode;
-
-       unsigned short ao_mode1;
-       unsigned short ao_mode2;
-       unsigned short ao_mode3;
-       unsigned short ao_cmd1;
-       unsigned short ao_cmd2;
-       unsigned short ao_cmd3;
-       unsigned short ao_trigger_select;
-       unsigned short gpct_mode0;
-       unsigned short gpct_mode1;
-       unsigned short gpct_command0;
-       unsigned short gpct_command1;
-       unsigned short gpct_input_select0;
-       unsigned short gpct_input_select1;
-
-       unsigned short ai_xorlist[512];
+       NI_PRIVATE_COMMON
 }ni_private;
 #define devpriv ((ni_private *)dev->private)
 
index e004343bd5b38f571959f12fc62a0c3820e7bd40..149a84bf05fc47c88823aa80edc39b13bf0ae1bf 100644 (file)
@@ -134,33 +134,7 @@ static ni_board ni_boards[]={
 typedef struct{
        dev_link_t *link;
 
-       int dio;
-       int ao0p,ao1p;
-       int lastchan;
-       int last_do;
-       int rt_irq;
-       int irqmask;
-       int aimode;
-
-int changain_state;
-unsigned int changain_spec;
-
-       unsigned short ao_mode1;
-       unsigned short ao_mode2;
-       unsigned short ao_mode3;
-       unsigned short ao_cmd1;
-       unsigned short ao_cmd2;
-       unsigned short ao_cmd3;
-       unsigned short ao_trigger_select;
-
-       unsigned short gpct_mode0;
-       unsigned short gpct_mode1;
-       unsigned short gpct_command0;
-       unsigned short gpct_command1;
-       unsigned short gpct_input_select0;
-       unsigned short gpct_input_select1;
-
-       unsigned short ai_xorlist[512];
+       NI_PRIVATE_COMMON
 }ni_private;
 #define devpriv ((ni_private *)dev->private)
 
index daf6ffa5fe98b3ced0d6d40eb005f7d6915972de..00349dfb11d8bcd24ac5772ba4d211df81c15d74 100644 (file)
@@ -405,31 +405,9 @@ comedi_driver driver_pcimio={
 
 
 typedef struct{
-       int dio;
-       int ao0p,ao1p;
-       int aip[64];
-       int lastchan;
-       int last_do;
        struct mite_struct *mite;
-       int rt_irq;
-       int irqmask;
-       int aimode;
-
-       unsigned short ao_mode1;
-       unsigned short ao_mode2;
-       unsigned short ao_mode3;
-       unsigned short ao_cmd1;
-       unsigned short ao_cmd2;
-       unsigned short ao_cmd3;
-       unsigned short ao_trigger_select;
-       unsigned short gpct_mode0;
-       unsigned short gpct_mode1;
-       unsigned short gpct_command0;
-       unsigned short gpct_command1;
-       unsigned short gpct_input_select0;
-       unsigned short gpct_input_select1;
-
-       unsigned short ai_xorlist[512];
+
+       NI_PRIVATE_COMMON
 }ni_private;
 #define devpriv ((ni_private *)dev->private)
 
index 1e7e13a2700cdddf3d61b016ca6e30dad27af81e..f4cb6d2ed1969fd2503c5cc11201aa6aaaa8e832 100644 (file)
@@ -544,6 +544,35 @@ static ni_board ni_boards[];
 
 #define boardtype ni_boards[dev->board]
 
+#define NI_PRIVATE_COMMON                                      \
+       int dio;                                                \
+       int ao0p,ao1p;                                          \
+       int lastchan;                                           \
+       int last_do;                                            \
+       int rt_irq;                                             \
+       int irqmask;                                            \
+       int aimode;                                             \
+                                                               \
+       int changain_state;                                     \
+       unsigned int changain_spec;                             \
+                                                               \
+       unsigned short ao_mode1;                                \
+       unsigned short ao_mode2;                                \
+       unsigned short ao_mode3;                                \
+       unsigned short ao_cmd1;                                 \
+       unsigned short ao_cmd2;                                 \
+       unsigned short ao_cmd3;                                 \
+       unsigned short ao_trigger_select;                       \
+                                                               \
+       unsigned short gpct_mode0;                              \
+       unsigned short gpct_mode1;                              \
+       unsigned short gpct_command0;                           \
+       unsigned short gpct_command1;                           \
+       unsigned short gpct_input_select0;                      \
+       unsigned short gpct_input_select1;                      \
+                                                               \
+       unsigned short ai_xorlist[512];                         \
+
 
 
 #endif /* _COMEDI_NI_STC_H */