[beken-72xx] Replace delay() define with inline function
This commit is contained in:
@@ -6,8 +6,10 @@
|
||||
#include "WCharacterFixup.h"
|
||||
#endif
|
||||
|
||||
#define delay delayMilliseconds // change delay()'s signature - it's defined as static inline in WVariant.h
|
||||
#include <api/ArduinoAPI.h>
|
||||
#include <core/LibreTuyaAPI.h>
|
||||
#undef delay
|
||||
|
||||
// Include family-specific code
|
||||
#include "WVariant.h"
|
||||
|
||||
@@ -9,9 +9,10 @@ extern "C" {
|
||||
#include "sdk_extern.h"
|
||||
#include "sdk_mem.h"
|
||||
|
||||
// allow BDK use its own delay() and let Arduino code use delayMilliseconds()
|
||||
void delayMilliseconds(unsigned long);
|
||||
#define delay delayMilliseconds
|
||||
// define an inline delay() which overrides BDK's delay()
|
||||
static inline __attribute__((always_inline)) void delay(unsigned long ms) {
|
||||
delayMilliseconds(ms);
|
||||
}
|
||||
|
||||
// from fixups/arch_main.c
|
||||
extern unsigned char __bk_rf_is_init;
|
||||
|
||||
@@ -127,7 +127,7 @@
|
||||
},
|
||||
"tool-ltchiptool": {
|
||||
"type": "uploader",
|
||||
"version": "https://github.com/libretuya/ltchiptool#v1.6.0",
|
||||
"version": "https://github.com/libretuya/ltchiptool#v1.6.1",
|
||||
"note": "This is used only for C/C++ code from ltchiptool."
|
||||
},
|
||||
"tool-openocd": {
|
||||
|
||||
Reference in New Issue
Block a user