Add backwards compatible defines for the USB reset interface#3062
Draft
will-v-pi wants to merge 1 commit into
Draft
Add backwards compatible defines for the USB reset interface#3062will-v-pi wants to merge 1 commit into
will-v-pi wants to merge 1 commit into
Conversation
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
lurch
reviewed
Jul 6, 2026
|
|
||
| #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 |
Contributor
There was a problem hiding this comment.
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
Contributor
Author
There was a problem hiding this comment.
No, that sort of wrapping should already be handled in pico/usb_reset_config.h
Contributor
Author
There was a problem hiding this comment.
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)
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 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Added into
stdio_usb.h, as that is where the old defines wereGuarded behind
PICO_STDIO_USB_BACKWARDS_COMPATIBLE_RESET_DEFINESso it can be disabled in futureFixes #3060