mirror of
https://github.com/meshtastic/firmware.git
synced 2026-01-30 21:51:51 +00:00
* 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>
20 lines
324 B
C++
20 lines
324 B
C++
|
|
#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;
|
|
}
|