Skip to content

shared/tinyusb: Allow ports to use 1200bps-touch without other CDC code. #15189

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

Conversation

dpgeorge
Copy link
Member

@dpgeorge dpgeorge commented Jun 2, 2024

This fixes the build for some esp32 and nrf boards (for example ARDUINO_NANO_33_BLE_SENSE and ARDUINO_NANO_ESP32) due to commit c98789a. Changes are:

  • Allow the CDC TX/RX functions in mp_usbd_cdc.c to be enabled separately to those needed for MICROPY_HW_USB_CDC_1200BPS_TOUCH.

  • Add MICROPY_EXCLUDE_SHARED_TINYUSB_USBD_CDC option as a temporary workaround for the nrf port to use.

  • Declare mp_usbd_line_state_cb() in a header as a public function.

  • Fix warning with type cast of .callback_line_state_changed.

Copy link

codecov bot commented Jun 2, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 98.39%. Comparing base (c1a6b95) to head (84a8f7e).

Additional details and impacted files
@@           Coverage Diff           @@
##           master   #15189   +/-   ##
=======================================
  Coverage   98.39%   98.39%           
=======================================
  Files         161      161           
  Lines       21204    21204           
=======================================
  Hits        20864    20864           
  Misses        340      340           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link

github-actions bot commented Jun 2, 2024

Code size report:

   bare-arm:    +0 +0.000% 
minimal x86:    +0 +0.000% 
   unix x64:    +0 +0.000% standard
      stm32:    +0 +0.000% PYBV10
     mimxrt:    +0 +0.000% TEENSY40
        rp2:    +0 +0.000% RPI_PICO
       samd:    +0 +0.000% ADAFRUIT_ITSYBITSY_M4_EXPRESS

This fixes the build for some esp32 and nrf boards (for example
`ARDUINO_NANO_33_BLE_SENSE` and `ARDUINO_NANO_ESP32`) due to commit
c98789a.  Changes are:

- Allow the CDC TX/RX functions in `mp_usbd_cdc.c` to be enabled
  separately to those needed for `MICROPY_HW_USB_CDC_1200BPS_TOUCH`.

- Add `MICROPY_EXCLUDE_SHARED_TINYUSB_USBD_CDC` option as a temporary
  workaround for the nrf port to use.

- Declare `mp_usbd_line_state_cb()` in a header as a public function.

- Fix warning with type cast of `.callback_line_state_changed`.

Signed-off-by: Damien George <damien@micropython.org>
@dpgeorge dpgeorge force-pushed the shared-tinyusb-fix-esp32-nrf-builds branch from fec816c to 84a8f7e Compare June 2, 2024 13:27
@dpgeorge dpgeorge merged commit 84a8f7e into micropython:master Jun 3, 2024
@dpgeorge dpgeorge deleted the shared-tinyusb-fix-esp32-nrf-builds branch June 3, 2024 02:59
@projectgus
Copy link
Contributor

@dpgeorge Would this have been caught pre-merge if we added one or two more boards in CI?

@dpgeorge
Copy link
Member Author

dpgeorge commented Jun 4, 2024

Would this have been caught pre-merge if we added one or two more boards in CI?

Yes. But there are 160 boards that we support (not including variants) and not all can be built for the CI...

Probably though it would be worth adding one of the ones that failed here. Preferably one that's quick to build and doesn't slow down the CI more.

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

Successfully merging this pull request may close these issues.

2 participants
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy