Friday, 13 September 2013

How can interleave Bulk transfer and Interrupt probing?

How can interleave Bulk transfer and Interrupt probing?

I'm writing a huge bulk tranfer to a real time USB device, but I would
like to receive some interrupts at the same time. It looks like the bulk
is stalling the interrupt probing, and even with a perpetual interrupt
probing loop they get "stuck", and I get a few interrupts after each bulk,
but not everything in the queue and all the new ones are stuck (generated
after the end of the bulk).
At the theoretical level javascript is visibly mono-thread, and the bulk
transfer seem to be in the main thread albeit its non-blockig-friendly API
(it freezes the browser). So I don't even know what I'm supposed to do.
Is there some demo code for that somewhere ? I can't find any non-trivial
uses of the chrome USB api on google.
It's very difficult to post code do a custom device, but the thing is
there:
https://github.com/nraynaud/webgcode/blob/gh-pages/webapp/index.js#L110

No comments:

Post a Comment