mirror of
https://github.com/alexhopeoconnor/firmware.git
synced 2026-10-22 11:17:49 +10:00
Add native Windows build of meshtasticd (#11031)
This commit is contained in:
+11
-3
@@ -1,19 +1,27 @@
|
||||
|
||||
#include "PowerHAL.h"
|
||||
|
||||
// PE/COFF has no ELF-style weak definitions, so a weak default is an undefined
|
||||
// reference on Windows. Only nrf52 and nrf54l15 override these; define them strongly.
|
||||
#ifdef _WIN32
|
||||
#define POWERHAL_WEAK_DEFAULT __attribute__((noinline))
|
||||
#else
|
||||
#define POWERHAL_WEAK_DEFAULT __attribute__((weak, noinline))
|
||||
#endif
|
||||
|
||||
void powerHAL_init()
|
||||
{
|
||||
return powerHAL_platformInit();
|
||||
}
|
||||
|
||||
__attribute__((weak, noinline)) void powerHAL_platformInit() {}
|
||||
POWERHAL_WEAK_DEFAULT void powerHAL_platformInit() {}
|
||||
|
||||
__attribute__((weak, noinline)) bool powerHAL_isPowerLevelSafe()
|
||||
POWERHAL_WEAK_DEFAULT bool powerHAL_isPowerLevelSafe()
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
__attribute__((weak, noinline)) bool powerHAL_isVBUSConnected()
|
||||
POWERHAL_WEAK_DEFAULT bool powerHAL_isVBUSConnected()
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user