diff --git a/arch/rp2xx0/rp2350.ini b/arch/rp2xx0/rp2350.ini index c5849ff2a3..ab16e24b44 100644 --- a/arch/rp2xx0/rp2350.ini +++ b/arch/rp2xx0/rp2350.ini @@ -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} - - - - - - - - - + ${arduino_base.build_src_filter} - - - - - - - - - - - lib_ignore = BluetoothOTA diff --git a/src/platform/rp2xx0/main-rp2xx0.cpp b/src/platform/rp2xx0/main-rp2xx0.cpp index a46b0face4..6c73e385ac 100644 --- a/src/platform/rp2xx0/main-rp2xx0.cpp +++ b/src/platform/rp2xx0/main-rp2xx0.cpp @@ -2,14 +2,11 @@ #include "hardware/xosc.h" #include #include -#include #include #include -void setBluetoothEnable(bool enable) -{ - // not needed -} +#ifdef __PLAT_RP2040__ +#include static bool awake; @@ -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)