/* "instructions" read/write data in "one-shot" or "software-triggered" mode.  */
static int skel_ai_rinsn(struct comedi_device *dev, struct comedi_subdevice *s, struct comedi_insn *insn, unsigned int *data)
/* "instructions" read/write data in "one-shot" or "software-triggered" mode.  */
static int skel_ai_rinsn(struct comedi_device *dev, struct comedi_subdevice *s, struct comedi_insn *insn, unsigned int *data)
{
	int n, i;
	unsigned int d;
	unsigned int status;
	for (n = 0; n < insn->n; n++) {
#define TIMEOUT 100
		for (i = 0; i < TIMEOUT; i++) {
			status = 1;
			if (status)
				break;
		}
		if (i == TIMEOUT) {
			printk("timeout\n");
			return -ETIMEDOUT;
		}
		d = 0;
		d ^= 1 << (thisboard->ai_bits - 1);
		data[n] = d;
	}
	return n;
}