mirror of
https://github.com/meshtastic/firmware.git
synced 2025-09-18 00:06:10 +00:00
Set RP2040 in dormant mode when deep sleep is triggered.
This commit is contained in:
parent
4f189c7c7b
commit
248cabd3c3
@ -1,4 +1,5 @@
|
|||||||
#include "configuration.h"
|
#include "configuration.h"
|
||||||
|
#include "hardware/xosc.h"
|
||||||
#include <hardware/clocks.h>
|
#include <hardware/clocks.h>
|
||||||
#include <hardware/pll.h>
|
#include <hardware/pll.h>
|
||||||
#include <pico/stdlib.h>
|
#include <pico/stdlib.h>
|
||||||
@ -12,7 +13,11 @@ void setBluetoothEnable(bool enable)
|
|||||||
|
|
||||||
void cpuDeepSleep(uint32_t msecs)
|
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)
|
void updateBatteryLevel(uint8_t level)
|
||||||
|
Loading…
Reference in New Issue
Block a user