- From: Félix <felix.monasteriohuelin_at_upm.es>
- Date: Fri, 19 Oct 2007 11:33:24 +0000
Hi.
I'm writing a driver for a customized board (FPGA) via PCI for robotic
applications.
I'm following skel.c and others PCI drivers of the Comedi list.
I have two questions:
1. My data registers are of 32, 16 and 8 bits (writable and readable). To
access theses memory registers I'm using writel, readl, writew, readw
and writeb, readb, functions respectively. ¿Is this correct?
2. I'm discover in comedi.h the 16bits type:
typedef unsigned int lsampl_t;
and in comedidev.h:
int (*insn_read)(comedi_device *,comedi_subdevice *,comedi_insn
*,lsampl_t *);
int (*insn_write)(comedi_device *,comedi_subdevice *,comedi_insn
*,lsampl_t *);
To configure subdevices in skel_attach, I include (is an example, for
subdevice pwm):
s->insn_write = skel_wpwm;
s->insn_read = skel_rpwm;
and later I program two functions:
static int skel_wpwm(comedi_device *dev,comedi_subdevice *s,comedi_insn
*insn,lsampl_t *data)
{...
}
static int skel_rpwm(comedi_device *dev,comedi_subdevice *s,comedi_insn
*insn,lsampl_t *data)
{...
}
I think that this does'nt work with 32bits registers. If this is so, ¿is
there some solution?
Thanks
Félix.
Received on 2007-10-19Z10:33:24