Skip to content
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

Fix usb_cdc.enable(console=False, data=True) #4848

Merged
merged 2 commits into from
Jun 2, 2021

Conversation

dhalbert
Copy link
Collaborator

@dhalbert dhalbert commented Jun 2, 2021

usb_cdc.enable(console=False, data=True) was not working.

  • Set usb_cdc defaults correctly
  • Use correct TinyUSB itf values when only one CDC is used. Number them from zero. This was the main bug.
  • Don't watch for ctrl-c if console is not enabled.
  • add board.LED to Metro M4. (Discovered it was missing by accident when i was trying to blink the led for debugging purposes).'

Tested on Feather STM32F405 and on Metro M4.

Thanks to discord user osten (@pdecherf) who found the problem and tested the fix on an STM32F405.

@dhalbert dhalbert requested review from tannewt and jepler June 2, 2021 15:34
jepler
jepler previously approved these changes Jun 2, 2021
Copy link
Member

@jepler jepler left a comment

Choose a reason for hiding this comment

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

Makes sense, but no testing performed. Are there more places we should switch to tud_cdc_n, in the long term?

@dhalbert
Copy link
Collaborator Author

dhalbert commented Jun 2, 2021

Makes sense, but no testing performed. Are there more places we should switch to tud_cdc_n, in the long term?

I looked in all the places to understand them, and added comments. Mainly, I fixed the broken simmel build.

Copy link
Member

@jepler jepler left a comment

Choose a reason for hiding this comment

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

thanks! once again, no testing performed.

@jepler jepler merged commit 26751c9 into adafruit:main Jun 2, 2021
@dhalbert dhalbert deleted the usb_cdc-data-only-fixes branch July 22, 2021 18:19
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.

None yet

2 participants