From: David Schleef Date: Tue, 5 Sep 2000 18:33:31 +0000 (+0000) Subject: moved ni_private common stuff to .h X-Git-Tag: r0_7_48~2 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=e6dca271911124c2244166211fb2b45c98c1cfa4;p=comedi.git moved ni_private common stuff to .h --- diff --git a/comedi/drivers/ni_atmio.c b/comedi/drivers/ni_atmio.c index da7e99b8..f1408e25 100644 --- a/comedi/drivers/ni_atmio.c +++ b/comedi/drivers/ni_atmio.c @@ -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) diff --git a/comedi/drivers/ni_mio_cs.c b/comedi/drivers/ni_mio_cs.c index e004343b..149a84bf 100644 --- a/comedi/drivers/ni_mio_cs.c +++ b/comedi/drivers/ni_mio_cs.c @@ -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) diff --git a/comedi/drivers/ni_pcimio.c b/comedi/drivers/ni_pcimio.c index daf6ffa5..00349dfb 100644 --- a/comedi/drivers/ni_pcimio.c +++ b/comedi/drivers/ni_pcimio.c @@ -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) diff --git a/comedi/drivers/ni_stc.h b/comedi/drivers/ni_stc.h index 1e7e13a2..f4cb6d2e 100644 --- a/comedi/drivers/ni_stc.h +++ b/comedi/drivers/ni_stc.h @@ -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 */