Skip to content

fix(demo): switch adapter based on defines, add PICO_CYW43_SUPPORTED#868

Open
tyeth wants to merge 6 commits intomigrate-api-v2from
add-sleep-mode-network-defines
Open

fix(demo): switch adapter based on defines, add PICO_CYW43_SUPPORTED#868
tyeth wants to merge 6 commits intomigrate-api-v2from
add-sleep-mode-network-defines

Conversation

@tyeth
Copy link
Copy Markdown
Member

@tyeth tyeth commented Feb 20, 2026

Currently you cannot build using platformio offline mode for Wi-Fi and non Wi-Fi adapters without manually changing the code base.

This PR facilitates not having to do that by checking suitable network defines on Wi-Fi enabled boards, and then picking the WiFi or non WiFi adapter.

Found issue moving between Pico2w and metroRP2350 when testing the sleep mode PR.

The CYW43 included with pico and rm2 modules has a specific define that we can track too, so the network adaptor has been augmented with this.

@brentru
Copy link
Copy Markdown
Member

brentru commented Feb 20, 2026

@tyeth Please add more information into this PR such as:

  • What problem does this solve, exactly?
  • Behavior before the define (you can describe it, logs are optional)
  • Behavior after the define inclusion

@tyeth
Copy link
Copy Markdown
Member Author

tyeth commented Feb 20, 2026

@tyeth Please add more information into this PR such as:

  • What problem does this solve, exactly?
  • Behavior before the define (you can describe it, logs are optional)
  • Behavior after the define inclusion

👍 Done

@brentru brentru self-requested a review February 20, 2026 16:12
Copy link
Copy Markdown
Member

@brentru brentru left a comment

Choose a reason for hiding this comment

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

@tyeth Perfect explanation, approved. This is currently a draft, please merge in as soon as you test so we can merge the main PR.

Base automatically changed from add-mode-sleep to migrate-api-v2 February 20, 2026 20:13
Comment thread platformio.ini
Comment on lines +471 to +474
-DARDUINO_ARCH_RP2350
-I$PROJECT_PACKAGES_DIR/framework-arduinopico/pico-sdk/src/rp2350/hardware_structs/include
-I$PROJECT_PACKAGES_DIR/framework-arduinopico/pico-sdk/src/rp2350/hardware_regs/include
-I$PROJECT_PACKAGES_DIR/framework-arduinopico/pico-sdk/src/rp2_common/hardware_powman/include
Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

we shouldn't be adding the arch define most likely, and instead rely on the BSP/earlePicoCore, although the includes were agreed to be needed for pio for now.

Comment thread platformio.ini
Comment on lines +478 to +482
build_src_filter =
+<*>
+<../.pio/libdeps/raspberrypi_pico_2w/Adafruit SleepyDog Library/utility/WatchdogRP2350/*.cpp>
+<../.pio/libdeps/raspberrypi_pico_2w/Adafruit SleepyDog Library/utility/WatchdogRP2350/pico_sleep/*.c>
+<../.pio/libdeps/raspberrypi_pico_2w/Adafruit SleepyDog Library/utility/WatchdogRP2350/hardware_rosc/*.c>
Copy link
Copy Markdown
Member Author

@tyeth tyeth Mar 24, 2026

Choose a reason for hiding this comment

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

The src filter to add rp2350 files looks to be a workaround for the compilation issue in sleepydog.
As a new PR has come in since to correct that, then @tyeth revisit this after it lands.

And RETEST!!!!

@tyeth tyeth marked this pull request as ready for review March 27, 2026 12:54
@tyeth tyeth force-pushed the add-sleep-mode-network-defines branch from 682fc6b to 39ccc29 Compare March 27, 2026 14:02
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