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

Add new feature defines to pico_stdio_usb #2296

Open
wants to merge 1 commit into
base: develop
Choose a base branch
from

Conversation

mbrase
Copy link

@mbrase mbrase commented Feb 18, 2025

This change adds the following to pico_stdio_usb:

  • PICO_STDIO_USB_ENABLE_IRQ_BACKGROUND_TASK
  • PICO_STDIO_USB_ENABLE_TINYUSB_INIT
  • PICO_STDIO_USB_USE_DEFAULT_DESCRIPTORS

These defines replace some ifdefs that were previously gated by the LIB_TINYUSB_DEVICE define and will allow finer grained control. All of these defines default to 1 if LIB_TINYUSB_DEVICE is not defined and 0 if LIB_TINYUSB_DEVICE is defined, which should preserve the old behavior.

This change adds the following to pico_stdio_usb:
- `PICO_STDIO_USB_ENABLE_IRQ_BACKGROUND_TASK`
- `PICO_STDIO_USB_ENABLE_TINYUSB_INIT`
- `PICO_STDIO_USB_USE_DEFAULT_DESCRIPTORS`

These defines replace some ifdefs that were previously gated by the
`LIB_TINYUSB_DEVICE` define and will allow finer grained control.
All of these defines default to 1 if LIB_TINYUSB_DEVICE is not defined
and 0 if LIB_TINYUSB_DEVICE is defined, which should preserve the
old behavior.
@kilograham kilograham added this to the 2.1.2 milestone Feb 18, 2025

// PICO_CONFIG: PICO_STDIO_USB_ENABLE_TINYUSB_INIT, Enable/disable calling tinyUSB tusb_init() during initialization, default=1 if the application is not using tinyUSB directly, group=pico_stdio_usb
#ifndef PICO_STDIO_USB_ENABLE_TINYUSB_INIT
#if !defined(LIB_TINYUSB_HOST) && !defined(LIB_TINYUSB_DEVICE)
Copy link
Contributor

Choose a reason for hiding this comment

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

Copying from other PR:

These are the only instances in the Pico SDK that use #if defined(LIB_*), I suspect they were intended to be #if LIB_*.

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.

3 participants