That's all that's in the header. I haven't found what the
usbkeycode[32] is. I found that it is lower byte is usage and the
higher one flags and that made me the structure. If I pack it with
alignment of 1, then it is ok.
So it looks like you're on the right track except from a quick look
of the source code, to me it seems that instead of there being up to
32 instances of {UInt8 flags, UInt8 usage}, it -seemed- to me
(based on code inspection only) that you should treat it instead as
up to 32 instances of UInt16's, each of which can have values
0x00e0, 0x00e1, 0x00e2, if they represent zero or more modifier keys
being down, followed by nonmodifier keys that would have values of
0xKKKK, etc. In other words, it seems that the HID data can be
variable length, being longer if more modifier keys are down, along
with more than just one nonmodifier key down. Again, just based on
code inspection. I am sure this must be documented somewhere.
I didn't find a note about that. rev 26.pdf manual is incomplete (I
wrote to dts as well). There're things like (to be documented later),
or function is used to ?????? :-)
- Is it safe to asssume that my interrupt handler gets removed when
the device gets unplugged?
What happens if app crashes due to someone else's fault? Will system
nuke in the nonexistent interrupt handler?? [docs don't say anything
about it or I missed something?]
I'm not an expert in this area, but, assuming you're using the
InstallInterruptFunctions os9 API (DriverServices.h) to install your
handler, when I take a quick look at the os9 sources, I don't see
any calls to (RemoveInterruptFunctions, DeleteInterruptSet,
DeactivateInterruptSourceTree) in such places as the USB protocol
stack or the Process Manager.
If you are using USBHIDInstallInterrupt in the keyboard HID driver's
dispatch table, then, again, I don't see any automatic calling of,
ie, USBHIDControlDevice(kHIDRemoveInterruptHandler,x); seems like
you would have to call this yourself when you detect an unplug.
Yup. I'm using USBHIDModuleDispatchTable->pUSBHIDInstallInterrupt.
From what I noted, interrupt got removed since it was not called when
I unplugged the device. When I replugged it back again, there was
"default" interrupt installed, but I'll rather remove (install the
default one, that's what you probably had to look for :) ) the
interrupt as well.
So, yes, these may well be problems. Perhaps someone else can chime in.
:-)
Thanks,
Tomas
--
Ing. Tomas Zahradnicky, Jr.
Production Manager, 24U Software
Associate Member, Filemaker Solutions Alliance
mailto:email@hiddenhttp://www.24uSoftware.com
_______________________________________________
usb mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/usb
Do not post admin requests to the list. They will be ignored.