comedi_error_done(dev,s);
return;
}
- s->cur_trig.data[s->async->buf_int_ptr>>1]=sampl & 0x0fff;
+ *(sampl_t *)(s->async->data+s->async->buf_int_ptr)=sampl & 0x0fff;
#ifdef PCI171X_EXTDEBUG
rt_printk("%8d %2d %8d~",s->async->buf_int_ptr,s->async->cur_chan,s->async->buf_int_count);
#endif
#else
- s->cur_trig.data[s->async->buf_int_ptr>>1]=inw(dev->iobase+PCI171x_AD_DATA) & 0x0fff;
+ *(sampl_t *)(s->async->data+s->async->buf_int_ptr)=
+ inw(dev->iobase+PCI171x_AD_DATA) & 0x0fff;
#endif
s->async->buf_int_count+=sizeof(sampl_t);
s->async->buf_int_ptr+=sizeof(sampl_t);
samplesinbuf=this_board->fifo_half_size;
if(s->async->buf_int_ptr+samplesinbuf*sizeof(sampl_t)>=devpriv->ai_data_len){
m=(devpriv->ai_data_len-s->async->buf_int_ptr)/sizeof(sampl_t);
- if (move_block_from_fifo(dev,s,((void *)(s->cur_trig.data))+s->async->buf_int_ptr,m,0))
+ if (move_block_from_fifo(dev,s,s->async->data+s->async->buf_int_ptr,m,0))
return;
s->async->buf_int_count+=m*sizeof(sampl_t);
samplesinbuf-=m;
}
if (samplesinbuf) {
- if (move_block_from_fifo(dev,s,((void *)(s->cur_trig.data))+s->async->buf_int_ptr,samplesinbuf,1))
+ if (move_block_from_fifo(dev,s,s->async->data+s->async->buf_int_ptr,samplesinbuf,1))
return;
s->async->buf_int_count+=samplesinbuf*sizeof(sampl_t);
devpriv->ai_n_chan=cmd->chanlist_len;
devpriv->ai_chanlist=cmd->chanlist;
devpriv->ai_flags=cmd->flags;
- devpriv->ai_data_len=cmd->data_len;
- devpriv->ai_data=cmd->data;
+ devpriv->ai_data_len=s->async->data_len;
+ devpriv->ai_data=s->async->data;
devpriv->ai_timer1=0;
devpriv->ai_timer2=0;
return -EIO;
}
+ request_region(iobase, this_board->iorange, "Advantech PCI-1710");
dev->iobase=iobase;
- request_region(dev->iobase, this_board->iorange, "Advantech PCI-1710");
dev->board_name = this_board->name;