mirror of
https://github.com/meshtastic/firmware.git
synced 2026-02-01 06:32:01 +00:00
NRF52 - power management improvements (#9211)
* minor NRF52 test cleanup * detect USB power input on ProMicro boards * prevent booting on power failure detection * introduce PowerHAL layer * powerHAL basic implementation for NRF52 * prevent data saves on low power * remove comment * Update src/platform/nrf52/main-nrf52.cpp Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> * Update src/power/PowerHAL.h Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> * Update src/main.cpp Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> * Merge missing voltage threshold comparison * add missing variable * add missing function declaration * remove debug strings --------- Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> Co-authored-by: Ben Meadors <benmmeadors@gmail.com>
This commit is contained in:
19
src/power/PowerHAL.cpp
Normal file
19
src/power/PowerHAL.cpp
Normal file
@@ -0,0 +1,19 @@
|
||||
|
||||
#include "PowerHAL.h"
|
||||
|
||||
void powerHAL_init()
|
||||
{
|
||||
return powerHAL_platformInit();
|
||||
}
|
||||
|
||||
__attribute__((weak, noinline)) void powerHAL_platformInit() {}
|
||||
|
||||
__attribute__((weak, noinline)) bool powerHAL_isPowerLevelSafe()
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
__attribute__((weak, noinline)) bool powerHAL_isVBUSConnected()
|
||||
{
|
||||
return false;
|
||||
}
|
||||
Reference in New Issue
Block a user