Choose which USB and USB HID devices to include at compile-time#2116
Conversation
There was a problem hiding this comment.
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?
hierophect
left a comment
There was a problem hiding this comment.
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,RAWIf only one HID device is chosen, then it will not have a report ID in the generated HID descriptor.
XAC_COMPATIBLE_GAMEPADis an alternate gamepad that is compatible with the Microsoft XAC controller.RAWis a 64-bit raw HID device, usage page0xFFAF, usage0xAF(AFis "AdaFruit").RAWcannot be used with other HID devices, because it cannot have a report id.The mechanism for generating the table of
usb_hid.Deviceentries 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.