[PLUG] Libusb 1.0

Michael Christopher Robinson michael at robinson-west.com
Thu Mar 30 22:53:56 UTC 2017


I am trying to enhance the Rui Barbosa Martins temperpi project.

I am detecting a buffering issue with usb_interrupt_read.

The original project would read from one sensor once in the C code.
I am trying to create a sqlite database in the C code and 
subsequently trying to store multiple readings from multiple 
sensors.  The following is the line that fails:

ret = usb_interrupt_read(t->handle, 0x82, (char*)buf, len, t->timeout);

I understand that 0x82 is an endpoint, but how does one come up with
that number and should it really be hardcoded???

Does libusb-1.0 do internal buffering where the buffers need to be
flushed before usb_interrupt_read is called?  How might I do that?




More information about the PLUG mailing list