Just to confirm that this was probably a stupid newbie question to
begin with...
I have done more research and since discovered that if I read bytes
off the *input* interrupt queue then my output updates are carried
out as expected. I suppose I probably just don't know enough about
the USB contract to know why I need to do this, but ultimately I
want to pay attention to the input interrupt too, so I'm OK with
this workaround.
Daniel
On Feb 12, 2006, at 2:35 PM, Daniel Jalkut wrote:
I've modified the USBSimple example to open interrupt pipes instead
of bulk transfer pipes. In doing this, I've managed to figure out
a reasonable 7-byte output pipe format that causes the desired LED
changes on my device.
However, the LEDs don't update immediately. In my testing, I
noticed that I would see the updated LEDs only on the *second* run
of the program. After a little debugging, I discovered the
"truism":
-> After a WritePipe or WritePipeAsync (and runloop run to
completion), the data written to the device doesn't seem to get
there until the *next* time I call SetConfiguration on the device.
I'm pretty sure it must be a side-effect of the SetConfiguration
call that is causing the data to "flush" or whatever. But does
anybody have any tips for how I might proceed? I thought I would
try to remote-debug the system and step into the SetConfiguration
call, to see which call in the kernel corresponds with the flush.
But that turned out to be more difficult than I was thinking.
Before I hunker down again to get that debugging environment
working as expected, I thought I might get lucky and gather some
good leads here.
Is it typical that I should have to do something else after the
WritePipe() call to make sure that the data gets pushed out? I
would think that whatever "starting over" effect that calling
SetConfiguration has would be roughly equivalent to the behavior of
closing down the interface and device when the application quits.
But even then the data doesn't seem to arrive until the next launch.
I suppose this is probably one of those famous "check the bus
analyzer" type questions, but unfortunately I don't have access to
one, and probably won't given the budget of this project.
Thanks for any leads you can provide!
Daniel
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Usb mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/usb/email@hidden
This email sent to email@hidden
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Usb mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/usb/email@hidden
This email sent to email@hidden