Doubts about Libusb on Linux
2009-07-01 06:56:45 GMT
Hi all,
I'm stuck with an usb related problem. I was trying to create a
remote control as explained in this link:
http://www.huitsing.nl/irftdi/ that basically generate pulses as the
USB start sending "0"s and "1"s to the chip. I build the hardware and
it works great for short pulses, but as the pulse size increase random
delays are inserted into the generated signal.
Digging into the Linux USB programming guides I found that probably the
best way to send data to the kernel is through a linked list of URBs.
As explained in
http://www.lrr.in.tum.de/Par/arch/usb/usbdoc/node23.html:
"next [optional input parameter]
It is possible to link several URBs in a chain by using the
next pointer. This
allows you to send a sequence of USB transfer requests to the USB core.
The
chain has to be terminated by a NULL pointer or the last URB has to be
linked
with the first.
This allows to automatically reschedule a number of URBs to
transfer a continous data stream."
While using libusb-compat/libusb (the IR remote control makes use of the ftdi library that depends on libusb-0.1) I have found no similar API interface that provides for linked list of data, just the possibility to send a buffer with a given size and length. I don't known if there is any possibility to send a list of data so that the kernel manages it as a continuous stream, or the library does so automatically or maybe that possibility is not allowed at this moment/is not planned at all or maybe I'm completely wrong and it makes no difference to send separate USB bulk transfers that sending a unique bulk transfer with a link of data.
Regards,
Enrique
------------------------------------------------------------------------------
_______________________________________________ Libusb-devel mailing list Libusb-devel <at> lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/libusb-devel
RSS Feed