1
0
Fork 0
mirror of https://github.com/betaflight/betaflight.git synced 2025-07-24 16:55:36 +03:00

Merge pull request #1315 from martinbudden/bf_utilities

Added ARRAYEND and DEBUG_SET utilities
This commit is contained in:
Martin Budden 2016-10-13 17:37:56 +01:00 committed by GitHub
commit 108a17d0f9
2 changed files with 3 additions and 0 deletions

View file

@ -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

View file

@ -21,6 +21,7 @@
#include <stdint.h>
#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)