Making a composite device.
Posted: Mon Jun 18, 2007 11:57 pm
Hello all.
The next step in my C64 USB keyboard implementation is trying to make a composite device that handles both the keyboard and two digital joysticks. I have made each of these work individually, that is two joysticks on one uController and the keyboard on a different one.
I tried to create a combined report (still only 8 bytes) containing both the keyboard and one joystick (the joystick report is only one byte), but aparently Windows cannot decide whether to use the keyboard or joystick driver for this device, so it ends up saying device installation failed, and nothing works.
I was thinking that I could make two different reports: one for the keyboard and one for the two joysticks. Is there any reason why this should not work?
For this, I guess I need to have a report ID in the reports. This should be no problem, except that the keyboard report can then not conform to the boot specification. Does anyone know if there would be a problem implementing a boot device (keyboard) that does not use the boot protocol when running in normal report mode, but does when the boot protocol is used? I assume this is the reason why there are SET_PROTOCOL and GET_PROTOCOL functions (which I have currently implemented, but which do nothing).
How do I make the composite device with two different reports. Does the setup request ask for which report to return, or is that something my application has to decide (e.g. switching between the two)?
The next step in my C64 USB keyboard implementation is trying to make a composite device that handles both the keyboard and two digital joysticks. I have made each of these work individually, that is two joysticks on one uController and the keyboard on a different one.
I tried to create a combined report (still only 8 bytes) containing both the keyboard and one joystick (the joystick report is only one byte), but aparently Windows cannot decide whether to use the keyboard or joystick driver for this device, so it ends up saying device installation failed, and nothing works.
I was thinking that I could make two different reports: one for the keyboard and one for the two joysticks. Is there any reason why this should not work?
For this, I guess I need to have a report ID in the reports. This should be no problem, except that the keyboard report can then not conform to the boot specification. Does anyone know if there would be a problem implementing a boot device (keyboard) that does not use the boot protocol when running in normal report mode, but does when the boot protocol is used? I assume this is the reason why there are SET_PROTOCOL and GET_PROTOCOL functions (which I have currently implemented, but which do nothing).
How do I make the composite device with two different reports. Does the setup request ask for which report to return, or is that something my application has to decide (e.g. switching between the two)?