8000 nrf: simmel: enable CIRCUITPY_USB_HID by xobs · Pull Request #2849 · adafruit/circuitpython · GitHub
[go: up one dir, main page]

Skip to content

nrf: simmel: enable CIRCUITPY_USB_HID #2849

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

Merged
merged 1 commit into from
May 4, 2020

Conversation

xobs
Copy link
@xobs xobs commented May 4, 2020

Simmel had USB HID disabled in order to save space. However, the board
configuration did not set USB_DEVICES, causing it to inherit the default
device bouquet of MSC,CDC,MIDI,HID. This in turn caused HID to be included
in the USB Configuration Descriptor.

For some reason, this was not a problem in an earlier version of tinyusb or
circuitpython. However, in the most recent version this has rightfully
caused asserts to appear during configuration.

Re-enable USB_HID for now, as it doesn't add too much in terms of space.
We may disable it again later on if we become pressed for space.

Simmel had USB HID disabled in order to save space.  However, the board
configuration did not set USB_DEVICES, causing it to inherit the default
device bouquet of MSC,CDC,MIDI,HID.  This in turn caused HID to be included
in the USB Configuration Descriptor.

For some reason, this was not a problem in an earlier version of tinyusb or
circuitpython.  However, in the most recent version this has rightfully
caused asserts to appear during configuration.

Re-enable USB_HID for now, as it doesn't add too much in terms of space.
We may disable it again later on if we become pressed for space.

Signed-off-by: Sean Cross <sean@xobs.io>
@hathach
Copy link
Member
hathach commented May 4, 2020

Oh great, really fast fidning, I didn't even manage to find the 833 dk in my arsenal yet 😄 . Indeed the tinyusb latest does has some internal improvement for handling drivers lately.

Copy link
Collaborator
@dhalbert dhalbert left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Aha! Great you figured this out.

We should probably have a check in a .mk file that USB_DEVICES does not contain HID if CIRCUITPY_USB_HID is 0. The same should be true for CIRCUITPY_USB_MIDI. We might even do that automatically.

@tannewt
Copy link
Member
tannewt commented May 4, 2020

Note that I changed the build logic in lower_power to not include the TinyUSB code for HID and MIDI when it is disabled. That is why it changed with that PR and it's merge.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants
0