Set RP2040 in dormant mode when deep sleep is triggered. ()

* Fix LED pinout for T-Echo board marked v1.0, date 2021-6-28

* Merge PR 

* 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.

---------

Co-authored-by: Ben Meadors <benmmeadors@gmail.com>
This commit is contained in:
Mictronics 2024-08-20 13:04:39 +02:00 committed by GitHub
parent bd21a0455b
commit ef5279e85e
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -1,4 +1,5 @@
#include "configuration.h"
#include "hardware/xosc.h"
#include <hardware/clocks.h>
#include <hardware/pll.h>
#include <pico/stdlib.h>
@ -12,7 +13,11 @@ void setBluetoothEnable(bool enable)
void cpuDeepSleep(uint32_t msecs)
{
// not needed
/* Disable both PLL to avoid power dissipation */
pll_deinit(pll_sys);
pll_deinit(pll_usb);
/* Set RP2040 in dormant mode. Will not wake up. */
xosc_dormant();
}
void updateBatteryLevel(uint8_t level)