-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Choose which USB and USB HID devices to include at compile-time #2116
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
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Low endpoint devices such as the F411 will still have issues with the descriptor file, as they need the MSC endpoints reduced from 2 to 1.
tandard.EndpointDescriptor(
description="MSC in",
bEndpointAddress=0x0 | standard.EndpointDescriptor.DIRECTION_IN,
bmAttributes=standard.EndpointDescriptor.TYPE_BULK,
bInterval=0),
standard.EndpointDescriptor(
description="MSC out",
bEndpointAddress=0x1 | standard.EndpointDescriptor.DIRECTION_OUT,
bmAttributes=standard.EndpointDescriptor.TYPE_BULK,
bInterval=0)
Could we introduce a flag or other condition for this case?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good! Thanks for including this.
Excited to see this! Will test tomorrow (hopefully) and then share w/friends in the XAC community! |
@dhalbert is there a version of Gamepad that matches the XAC gamepad? |
@ATMakersBill Yes, see the top post. You can do (in, say,
and get a single XAC gamepad without a report ID. Use your XAC-compatible Gamepad.py. I plan to test this soon. |
Sorry, I meant was there an updated HID library with an XAC gamepad. I can test with mine, but was wondering how that would be added to the libs |
Nope, I didn't add anything yet - just use your library for now. It will probably be a separate library, because adding it to frozen HID will make HID even bigger and take more flash, which is a problem on CPX. |
Yes, a way to control of which devices the USB composite device consists of is very important! |
Make it easy to enable and disable which USB and USB HID devices to include at build time, using two makefile variables. Defaults are:
For instance, in
mpconfigboard.mk
, you can define those variables:A couple of new HID devices have been added, but are not in the default set. The entire set is
KEYBOARD,MOUSE,CONSUMER,SYS_CONTROL,GAMEPAD,DIGITIZER,XAC_COMPATIBLE_GAMEPAD,RAW
If only one HID device is chosen, then it will not have a report ID in the generated HID descriptor.
XAC_COMPATIBLE_GAMEPAD
is an alternate gamepad that is compatible with the Microsoft XAC controller.RAW
is a 64-bit raw HID device, usage page0xFFAF
, usage0xAF
(AF
is "AdaFruit").RAW
cannot be used with other HID devices, because it cannot have a report id.The mechanism for generating the table of
usb_hid.Device
entries has also been simplified. More code is generated and less is done by tricky Makefile variables.This partially addresses some needs stated in #1015 but does not allow generation of USB or USB HID descriptors at run-time, in
boot.py
.Tagging @ATMakersBill and @hierophect for interest.