8000 Compute USB_DEVICES instead of requiring it to be specified by jepler · Pull Request #3038 · adafruit/circuitpython · GitHub
[go: up one dir, main page]

Skip to content

Compute USB_DEVICES instead of requiring it to be specified #3038

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 8000 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 10 commits into from
Jun 24, 2020

Conversation

jepler
Copy link
@jepler jepler commented Jun 16, 2020

If it is possible, it would be nice to avoid the need to change USB_DEVICES when changing CIRCUITPY_USB_HID and ... _MIDI. If #3037 passes CI, then this PR doesn't change anything about available USB devices, it just allows the value to be calculated in all cases.

jepler added 3 commits June 15, 2020 15:22
These are already disabled via the USB_DEVICES setting, but the code is
included anyway.
@jerryneedell
Copy link
Collaborator
jerryneedell commented Jun 16, 2020

I think this also has to include the atmel-samd pewpew10 build
see comment in #3037
ah -- perhaps not - since it was not there to begin with, I guess this PR will just fix it magically.

Copy link
Member
@tannewt tannewt left a comment

Choose a reason for hiding this comment

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

I believe you should also disable CIRCUITPY_USB_(MIDI,HID) for all of the boards that disabled it in the descriptor. That will free up more space.

jepler added 5 commits June 23, 2020 10:56
.. it was not in the USB descriptors anyway (lack of enough endpoints?)
.. it was not in the USB descriptors anyway (lack of enough endpoints?)
.. it was not in the USB descriptors anyway (lack of enough endpoints?)
This makes them all overridable on the board level, tersely
@jepler jepler force-pushed the compute-usb-devices branch from 0df3344 to 4933b7a Compare June 23, 2020 17:32
Since Actions passed on the previous commit, where this computed value
was checked against the specified value (if any), this is no net change,
except that we no longer need to specify it for particular boards or
ports.
@jepler jepler force-pushed the compute-usb-devices branch from 4933b7a to f232aef Compare June 23, 2020 18:06
@jepler jepler requested a review from tannewt June 23, 2020 19:19
@jepler
Copy link
Author
jepler commented Jun 23, 2020

@tannewt Please take a look again, and at #3037 to see that the computed values and the hard-coded values agreed in all cases before I removed the hard-coded values and replaced them with the computed values.

This restores the ability to remove CDC and/or MSC, at the price of
giving up the new automatic check that USB_DEVICES is correct.
Since devices have to have CDC and MSC to be "CircuitPython",
this is not a facility that is going to be used by any in-tree drivers.
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.

This is a good error checker for now. Thank you ! It can be made more flexible/strict later.

The single Actions failure is not interesting: it's the usual sort of github hiccup.

@jepler jepler dismissed tannewt’s stale review June 24, 2020 18:31

The CIRCUITPY_USB_yyy disables were added.

@jepler jepler merged commit 87835c7 into adafruit:main Jun 24, 2020
@jepler jepler deleted the compute-usb-devices branch November 3, 2021 21:09
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