Skip to content

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

Merged
dpgeorge merged 1 commit into
micropython:masterfrom
dpgeorge:shared-tinyusb-fix-esp32-nrf-builds
Jun 3, 2024
Merged

dpgeorge merged 1 commit into
micropython:masterfrom
dpgeorge:shared-tinyusb-fix-esp32-nrf-builds

Conversation

@dpgeorge

@dpgeorge dpgeorge commented Jun 2, 2024

Copy link
Copy Markdown
Member

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.

@codecov

codecov Bot commented Jun 2, 2024 •

Copy link
Copy Markdown

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.

@github-actions

github-actions Bot commented Jun 2, 2024

Copy link
Copy Markdown

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 <[email protected]>
@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
Copy Markdown
Contributor

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

@dpgeorge

dpgeorge commented Jun 4, 2024

Copy link
Copy Markdown
Member Author

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