Tricky USB device.
ticso at cicely12.cicely.de
Fri Apr 8 16:13:18 PDT 2005
On Fri, Apr 08, 2005 at 03:32:56PM -0700, Maksim Yevmenkin wrote:
> hmm... why even use libusb? cant you just "fd = open("/dev/ugen0.1",
> O_RDWR);" and then "write(fd, "MK255", 5)" and "read(fd, ...);". note:
> here i assume ugen0 is the device.
> >I'm also not entirely clear how/when to use usb_interrupt_read()
> >... as many of the commands listed in the manual return data, but
> >usb_inerrupt_write() doesn't seem to allow for data to be returned,
> >but following usb_interrupt_write(), the read will hang.
> i'd guess you have to keep read pipe open at all times. that is what "fd
> = open("/dev/ugen0.1", O_RDWR);" will do - it will open both read and
> write pipes (because of O_RDWR).
> then you just
> write(fd, ...);
> read(fd, ...);
select(2) and non-blocking should work with ugen and interrupt endpoints
B.Walter BWCT http://www.bwct.de
bernd at bwct.de info at bwct.de
More information about the freebsd-hackers