-
Notifications
You must be signed in to change notification settings - Fork 329
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add Physical Descriptor Support #85
base: master
Are you sure you want to change the base?
Conversation
Wow, fantastic work! This is wonderful and I'm sure others will appreciate it. There's a few minor things for me to fix up, which I'll do some time this week before merging it in (you've done the bulk of the work, I'm happy to tidy things up). Notes for myself:
|
May I ask why a physical descriptor is needed? I never used/saw that feature. |
A lot of implementations of HID tend to use a fixed Report Descriptor that is well known to the end application. so all the reports a pre-mapped, or most likely hard coded. There are multiple uses for Physical Descriptors. One case is with the Virtual Reality usage page (0x03), a Glove requires the inputs to have designators mapping to the physical descriptor so that the application can automatically map to. An example I can think of is a generic game controller where the game can use the right hand thumb with 0 effort as the primary button, and a effort of 1 to be the secondary button. it seems like a weird concept. But from a game's perspective, it could help when a unknown controller is plugged in for the first time and needing to automatically map as many actions as possible that the user is familiar with. So they have minimal setup time and less effort adjusting to the new controller. |
Well I feel like a right muppet for completely forgetting about this; I'll look at it Saturday along with #91. |
There are two parts to this PR, the first being the support for physical descriptors by providing structs and a couple of macros in
LUFA/Drivers/USB/Class/Common/HIDClassCommon.h
The second part is a copied and modified joystick demo which:
CALLBACK_USB_GetDescriptor