mirror of
https://github.com/meshtastic/firmware.git
synced 2025-02-26 22:33:24 +00:00
Set RP2040 in dormant mode when deep sleep is triggered. (#4510)
* 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. --------- Co-authored-by: Ben Meadors <benmmeadors@gmail.com>
This commit is contained in:
parent
bd21a0455b
commit
ef5279e85e
@ -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)
|
||||
|
Loading…
Reference in New Issue
Block a user