Add native Windows build of meshtasticd (#11031)

This commit is contained in:
Thomas Göttgens
2026-07-19 23:31:19 +02:00
committed by GitHub
parent 4726375282
commit a808e992a1
16 changed files with 910 additions and 21 deletions
+11 -3
View File
@@ -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;
}