devpriv->ai1234_flags=cmd->flags;
devpriv->ai1234_n_chan=cmd->chanlist_len;
devpriv->ai1234_chanlist=cmd->chanlist;
- devpriv->ai1234_data=cmd->data;
- devpriv->ai1234_data_len=cmd->data_len;
+ devpriv->ai1234_data=s->async->data;
+ devpriv->ai1234_data_len=s->async->data_len;
if (cmd->stop_arg==TRIG_COUNT) { devpriv->ai1234_scans=cmd->stop_arg; }
else { devpriv->ai1234_scans=0; }
devpriv->ai1234_timer1=0;
printk("stop_src: %d\n", cmd->stop_src);
printk("stop_arg: %d\n", cmd->stop_arg);
printk("chanlist_len: %d\n", cmd->chanlist_len);
- printk("data_len: %d\n", cmd->data_len);
}
*/
echo "E: uses cmd->data or cmd->data_len"
fi
-if grep -E 'buf_int_ptr++' ${driver} &>/dev/null;then
+if grep 'buf_int_ptr++' ${driver} &>/dev/null;then
echo "E: uses buf_int_ptr++"
fi
-if grep -E 'buf_int_count++' ${driver} &>/dev/null;then
+if grep 'buf_int_count++' ${driver} &>/dev/null;then
echo "E: uses buf_int_count++"
fi
/* utility function used by das1800 interrupt service routines */
inline void write_to_buffer(comedi_device *dev, comedi_subdevice *s, sampl_t data_point)
{
- if(s->async->buf_int_ptr >= s->async->cmd.data_len )
+ if(s->async->buf_int_ptr >= s->async->data_len )
{
s->async->buf_int_ptr = 0;
comedi_eobuf(dev, s);
}
- *((sampl_t *)((void *)s->async->cmd.data + s->async->buf_int_ptr)) = data_point;
+ *((sampl_t *)((void *)s->async->data + s->async->buf_int_ptr)) = data_point;
s->async->cur_chan++;
if(s->async->cur_chan >= s->async->cur_chanlist_len)
{
if(devpriv->count > 0 || devpriv->forever == 1)
{
/* write data point to buffer */
- if(async->buf_int_ptr >= async->cmd.data_len )
+ if(async->buf_int_ptr >= async->data_len )
{
async->buf_int_ptr = 0;
comedi_eobuf(dev, s);
}
- *((sampl_t *)((void *)async->cmd.data + async->buf_int_ptr)) = dataPoint;
+ *((sampl_t *)((void *)async->data + async->buf_int_ptr)) = dataPoint;
async->cur_chan++;
if( async->cur_chan >= async->cur_chanlist_len )
{