Skip to content

Add backwards compatible defines for the USB reset interface#3062

Draft
will-v-pi wants to merge 1 commit into
developfrom
stdio-usb-reset-compat
Draft

Add backwards compatible defines for the USB reset interface#3062
will-v-pi wants to merge 1 commit into
developfrom
stdio-usb-reset-compat

Conversation

@will-v-pi

Copy link
Copy Markdown
Contributor

Added into stdio_usb.h, as that is where the old defines were

Guarded behind PICO_STDIO_USB_BACKWARDS_COMPATIBLE_RESET_DEFINES so it can be disabled in future

Fixes #3060

Added into stdio_usb.h, as that is where the old defines were

Guarded behind PICO_STDIO_USB_BACKWARDS_COMPATIBLE_RESET_DEFINES so it can be disabled in future
@will-v-pi will-v-pi added this to the 2.3.1 milestone Jul 6, 2026
@will-v-pi will-v-pi requested a review from kilograham July 6, 2026 10:00

#if PICO_STDIO_USB_BACKWARDS_COMPATIBLE_RESET_DEFINES
#include "pico/usb_reset_config.h"
#define PICO_STDIO_USB_ENABLE_RESET_VIA_BAUD_RATE PICO_ENABLE_USB_RESET_VIA_BAUD_RATE

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Do each of these need to be wrapped in an #ifndef? E.g.

#ifndef PICO_STDIO_USB_ENABLE_RESET_VIA_BAUD_RATE
#define PICO_STDIO_USB_ENABLE_RESET_VIA_BAUD_RATE PICO_ENABLE_USB_RESET_VIA_BAUD_RATE
#endif

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

No, that sort of wrapping should already be handled in pico/usb_reset_config.h

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Oh actually, yes, they will need some sort of wrapping to prevent duplicate definitions (although the duplicate definitions would be the same value, as that is handled in pico/usb_reset_config.h)

@will-v-pi will-v-pi marked this pull request as draft July 6, 2026 12:38
@will-v-pi

Copy link
Copy Markdown
Contributor Author

It was suggested in #3060 (comment) that this probably isn't worth it, as anyone using the old defines will need to update their project anyway to work with the new defines, so putting this in draft and can be closed if others agree

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.

2 participants