Fix build for Pico2 RP2350 platform. (#5783)

* 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 <benmmeadors@gmail.com>
Co-authored-by: Thomas Göttgens <tgoettgens@gmail.com>
Co-authored-by: GUVWAF <78759985+GUVWAF@users.noreply.github.com>
This commit is contained in:
Mictronics
2025-01-07 16:57:42 +01:00
committed by GitHub
parent 27fbfd03d6
commit 9421eba027
2 changed files with 19 additions and 9 deletions

View File

@@ -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;
@@ -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)