if(s->async->buf_int_ptr+samplesinbuf*sizeof(sampl_t)>=devpriv->ai1234_data_len){
m=(devpriv->ai1234_data_len-s->async->buf_int_ptr)/sizeof(sampl_t);
- if (this_board->ai_maxdata==0xfff) { move_block_from_dma_12bit(dev,s,(void *)ptr,((void *)(s->async->data))+s->async->buf_int_ptr,m); }
- else { move_block_from_dma_16bit(dev,s,(void *)ptr,((void *)(s->async->data))+s->async->buf_int_ptr,m); }
+ if (this_board->ai_maxdata==0xfff) { move_block_from_dma_12bit(dev,s,(void *)ptr,((void *)(devpriv->ai1234_data))+s->async->buf_int_ptr,m); }
+ else { move_block_from_dma_16bit(dev,s,(void *)ptr,((void *)(devpriv->ai1234_data))+s->async->buf_int_ptr,m); }
s->async->buf_int_count+=m*sizeof(sampl_t);
ptr+=m*sizeof(sampl_t);
samplesinbuf-=m;
}
if (samplesinbuf) {
- if (this_board->ai_maxdata==0xfff) { move_block_from_dma_12bit(dev,s,(void *)ptr,((void *)(s->async->data))+s->async->buf_int_ptr,samplesinbuf); }
- else { move_block_from_dma_16bit(dev,s,(void *)ptr,((void *)(s->async->data))+s->async->buf_int_ptr,samplesinbuf); }
+ if (this_board->ai_maxdata==0xfff) { move_block_from_dma_12bit(dev,s,(void *)ptr,((void *)(devpriv->ai1234_data))+s->async->buf_int_ptr,samplesinbuf); }
+ else { move_block_from_dma_16bit(dev,s,(void *)ptr,((void *)(devpriv->ai1234_data))+s->async->buf_int_ptr,samplesinbuf); }
s->async->buf_int_count+=samplesinbuf*sizeof(sampl_t);
s->async->buf_int_ptr+=samplesinbuf*sizeof(sampl_t);
if (!(devpriv->ai1234_flags & TRIG_WAKE_EOS)) {
devpriv->ai1234_chanlist=it->chanlist;
devpriv->ai1234_scans=it->n;
devpriv->ai1234_flags=it->flags;
- devpriv->ai1234_data_len=it->data_len;
devpriv->ai1234_data=it->data;
+ devpriv->ai1234_data_len=it->data_len;
devpriv->ai1234_timer1=it->trigvar;
devpriv->ai1234_timer2=it->trigvar1;
comedi_error_done(dev,s);
return;
}
- *(sampl_t *)(s->async->data+s->async->buf_int_ptr)=sampl & 0x0fff;
+ *(sampl_t *)((void *)(devpriv->ai_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
- *(sampl_t *)(s->async->data+s->async->buf_int_ptr)=
- inw(dev->iobase+PCI171x_AD_DATA) & 0x0fff;
+ *(sampl_t *)((void *)(devpriv->ai_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,s->async->data+s->async->buf_int_ptr,m,0))
+ if (move_block_from_fifo(dev,s,((void *)(devpriv->ai_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,s->async->data+s->async->buf_int_ptr,samplesinbuf,1))
+ if (move_block_from_fifo(dev,s,((void *)(devpriv->ai_data))+s->async->buf_int_ptr,samplesinbuf,1))
return;
s->async->buf_int_count+=samplesinbuf*sizeof(sampl_t);