Skip to content

Commit

Permalink
Fix build for Pico2 RP2350 platform. (#5783)
Browse files Browse the repository at this point in the history
* Fix LED pinout for T-Echo board marked v1.0, date 2021-6-28

* Merge PR #420

* Fixed double and missing Default class.

* Use correct format specifier and fixed typo.

* Removed duplicate code.

* Fix error: #if with no expression

* Fix warning: extra tokens at end of #endif directive.

* Fix antenna switching logic. Complementary-pin control logic is required on the rp2040-lora board.

* Fix deprecated macros.

* Set RP2040 in dormant mode when deep sleep is triggered.

* Fix array out of bounds read.

* Admin key count needs to be set otherwise the key will be zero loaded after reset.

* Don't reset the admin key size when loading defaults. Preserve an existing key in config if possible.

* Remove log spam when reading INA voltage sensor.

* Remove static declaration for admin keys from userPrefs.h. Load hard coded admin keys in case config file has empty slots.

* Removed newlines from log.

* Fix issue #5665.

* Fix build for Pico2 RP2350 platform.

---------

Co-authored-by: Ben Meadors <[email protected]>
Co-authored-by: Thomas Göttgens <[email protected]>
Co-authored-by: GUVWAF <[email protected]>
  • Loading branch information
4 people authored Jan 7, 2025
1 parent 27fbfd0 commit 9421eba
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 9 deletions.
6 changes: 3 additions & 3 deletions arch/rp2xx0/rp2350.ini
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,12 @@ platform_packages = framework-arduinopico@https://github.com/earlephilhower/ardu
board_build.core = earlephilhower
board_build.filesystem_size = 0.5m
build_flags =
${arduino_base.build_flags} -Wno-unused-variable
${arduino_base.build_flags} -Wno-unused-variable -Wcast-align
-Isrc/platform/rp2xx0
-D__PLAT_RP2040__
-D__PLAT_RP2350__
# -D _POSIX_THREADS
build_src_filter =
${arduino_base.build_src_filter} -<platform/esp32/> -<nimble/> -<modules/esp32> -<platform/nrf52/> -<platform/stm32wl> -<mesh/eth/> -<mesh/wifi/> -<mesh/http/> -<mesh/raspihttp>
${arduino_base.build_src_filter} -<platform/esp32/> -<nimble/> -<modules/esp32> -<platform/nrf52/> -<platform/stm32wl> -<mesh/eth/> -<mesh/wifi/> -<mesh/http/> -<mesh/raspihttp> -<platform/rp2xx0/pico_sleep> -<platform/rp2xx0/hardware_rosc>

lib_ignore =
BluetoothOTA
Expand Down
22 changes: 16 additions & 6 deletions src/platform/rp2xx0/main-rp2xx0.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,11 @@
#include "hardware/xosc.h"
#include <hardware/clocks.h>
#include <hardware/pll.h>
#include <pico/sleep.h>
#include <pico/stdlib.h>
#include <pico/unique_id.h>

void setBluetoothEnable(bool enable)
{
// not needed
}
#ifdef __PLAT_RP2040__
#include <pico/sleep.h>

static bool awake;

Expand Down Expand Up @@ -66,7 +63,20 @@ void cpuDeepSleep(uint32_t msecs)
rp2040.reboot();

/* Set RP2040 in dormant mode. Will not wake up. */
// xosc_dormant();
// xosc_dormant();
}

#else
void cpuDeepSleep(uint32_t msecs)
{
/* Set RP2040 in dormant mode. Will not wake up. */
xosc_dormant();
}
#endif

void setBluetoothEnable(bool enable)
{
// not needed
}

void updateBatteryLevel(uint8_t level)
Expand Down

0 comments on commit 9421eba

Please sign in to comment.