fix(libsim): use different __weak syntax depending on target (#6132)

This commit is contained in:
Peter Feerick
2025-04-24 16:54:55 +10:00
committed by GitHub
parent 2a21636e70
commit 71ec1f428f
+9 -3
View File
@@ -23,14 +23,20 @@
#include "hal/rgbleds.h"
#include "definitions.h"
#if defined(SIMU)
#define __weak
#elif !defined(__weak)
#define __weak __attribute__((weak))
#endif
bool usbChargerLed() { return true; }
void ledRed() {}
void ledGreen() {}
void ledBlue() {}
void ledOff() {}
__attribute__((weak)) void fsLedOn(uint8_t) {}
__attribute__((weak)) void fsLedOff(uint8_t) {}
__attribute__((weak)) void fsLedRGB(uint8_t, uint32_t) {}
__weak void fsLedOn(uint8_t) {}
__weak void fsLedOff(uint8_t) {}
__weak void fsLedRGB(uint8_t, uint32_t) {}
bool fsLedState(uint8_t) { return false;}
void rgbSetLedColor(unsigned char, unsigned char, unsigned char, unsigned char) {}
void rgbLedColorApply() {}