From: Santiago P. Sanchez-M. <sp...@gm...> - 2008-12-18 15:08:02
|
Hi, The thing is that you can always send 64 bytes as normal packet, and in some cases, do not use all of them. Another approach es that the interrupt will trigger a bulk read of a variable size determined by what the interrupt packet says. But in that case, you will have several usb transactions, and the result might be slower. You may have a mixed approach, in which the interrupt packet holds 64 bytes always, and sometimes it reflects the need for a bulk read. (For longer commands). On Thu, Dec 18, 2008 at 4:03 PM, Phil Hannent <ph...@ha...> wrote: > Hello, > > I am trying to write a driver for an interactive whiteboard. > > The device needs to be put into a state that will get it sending the pen > data. > > However I have been looking examples on the internet and when using > interruptRead or bulkRead you have to specify the number of bytes you are > expecting. > > There are 30+ commands in the protocol with the device with a length which > will > be unknown until I read the first byte. > > I want to have a control loop that will read the interrupt and respond to > that > data. With a user interface sending change of state commands. > > Does anybody have an example of the use of interruptRead and > interruptWrite? > > Regards > Phil Hannent > > > > ------------------------------------------------------------------------------ > SF.Net email is Sponsored by MIX09, March 18-20, 2009 in Las Vegas, Nevada. > The future of the web can't happen without you. Join us at MIX09 to help > pave the way to the Next Web now. Learn more and register at > > http://ad.doubleclick.net/clk;208669438;13503038;i?http://2009.visitmix.com/ > _______________________________________________ > Pyusb-users mailing list > Pyu...@li... > https://lists.sourceforge.net/lists/listinfo/pyusb-users > > |