diff --git a/src/main/build/debug.h b/src/main/build/debug.h index 42745e9e89..408aece237 100644 --- a/src/main/build/debug.h +++ b/src/main/build/debug.h @@ -21,6 +21,8 @@ extern int16_t debug[DEBUG16_VALUE_COUNT]; extern uint8_t debugMode; +#define DEBUG_SET(mode, index, value) {if (debugMode == (mode)) {debug[(index)] = (value);}} + #define DEBUG_SECTION_TIMES #ifdef DEBUG_SECTION_TIMES diff --git a/src/main/common/utils.h b/src/main/common/utils.h index 27a51f3984..2b9d7d66e4 100644 --- a/src/main/common/utils.h +++ b/src/main/common/utils.h @@ -21,6 +21,7 @@ #include #define ARRAYLEN(x) (sizeof(x) / sizeof((x)[0])) +#define ARRAYEND(x) (&(x)[ARRAYLEN(x)]) #define CONCAT_HELPER(x,y) x ## y #define CONCAT(x,y) CONCAT_HELPER(x, y)