ts.tv_nsec=cmd->scan_begin_arg;
#ifdef CONFIG_COMEDI_RTL
- // XXX timespec_to_RTIME() is undeclared (and undefined?) compiling against rtl3.0 - FMH
- period=timespec_to_RTIME(ts);
+ period=HRT_TO_8254(cmd->scan_begin_arg);
rt_task_init(&devpriv->rt_task,timer_ai_task_func,(int)dev,3000,4);
#endif
#ifdef CONFIG_COMEDI_RTAI
period = start_rt_timer(nano2count(cmd->scan_begin_arg));
- // XXX line repeated a few lines down? - FMH
- now = rt_get_time();
rt_task_init(&devpriv->rt_task,timer_ai_task_func,(int)dev,3000,0,0,0);
- // XXX line repeated a few lines down? - FMH
- rt_task_make_periodic(&devpriv->rt_task,now+period,period);
#endif
now=rt_get_time();
comedi_subdevice *s;
printk("comedi%d: timer: ",dev->minor);
+
dev->board_name="timer";
dev->n_subdevices=1;
devpriv->device=it->options[0];
devpriv->subd=it->options[1];
+ printk("device %d, subdevice %d\n", devpriv->device, devpriv->subd);
+
devpriv->dev=comedi_get_device_by_minor(devpriv->device);
devpriv->s=devpriv->dev->subdevices+devpriv->subd;
s=dev->subdevices+0;
+ dev->read_subdev = s;
s->type=COMEDI_SUBD_AI;
s->subdev_flags=SDF_READABLE;
s->n_chan=devpriv->s->n_chan;