Hello,
What are the main differences between the Interrupt Pipe and th bulk on in practice … I’ve been trying to develop an application that reads when the state of some switches changes on the usb board. But I can see no difference between the interrupt and bulk implementation on the lvr demo code … Is there any function like RegisterDeviceNotification in order to read the status of the switches when it changes …I saw an implementation that describes the IO_CTL_SWITCH_STATE_CHANGE in an specific KMDF driver …
I thought of an implementation that calls the WinUsb_Readpipe continuosly even when a read operation fails … But I suppose such solution loads the processor … Is there any other solution ? What are the differences between the interrupt and bulk pipe in the winusb implementation ?
THank you
xxxxx@gmail.com wrote:
What are the main differences between the Interrupt Pipe and th bulk on in practice …
The only difference is that an interrupt pipe gets a chunk of the
bandwidth that is reserved for it. It will always get its spot,
although it can’t go any faster. A bulk pipe can suck up whatever
bandwidth is available, no matter how much or how little.
An interrupt endpoint can also declare its own maximum packet size. A
bulk pipe is always 512 (on a USB 2 device).
I’ve been trying to develop an application that reads when the state of some switches changes on the usb board. But I can see no difference between the interrupt and bulk implementation on the lvr demo code …
That’s quite possible.
Is there any function like RegisterDeviceNotification in order to read the status of the switches when it changes …I saw an implementation that describes the IO_CTL_SWITCH_STATE_CHANGE in an specific KMDF driver …
I thought of an implementation that calls the WinUsb_Readpipe continuosly even when a read operation fails … But I suppose such solution loads the processor …
Nope, that’s the way it is done. Your USB keyboard and mouse work
exactly like this. Hence the name “continuous reader”.
The read operation doesn’t fail. If there is no data available, it will
just wait until there is data. Remember that USB is owned entirely by
the host. There is no way for a device to initiate anything. It has to
wait until it is queried by the host, and the host will only do that if
some device has queued up a request.
–
Tim Roberts, xxxxx@probo.com
Providenza & Boekelheide, Inc.