mirror of
https://github.com/iNavFlight/inav.git
synced 2025-07-25 17:25:18 +03:00
Moved UNUSED to common/utils.h as in betaflight
This commit is contained in:
parent
3eb92ff402
commit
0b290fc174
30 changed files with 53 additions and 49 deletions
|
@ -20,8 +20,6 @@
|
|||
#include <stddef.h>
|
||||
#include <stdint.h>
|
||||
|
||||
#include "common/time.h"
|
||||
|
||||
#define ARRAYLEN(x) (sizeof(x) / sizeof((x)[0]))
|
||||
#define ARRAYEND(x) (&(x)[ARRAYLEN(x)])
|
||||
|
||||
|
@ -34,7 +32,9 @@
|
|||
#define EXPAND_I(x) x
|
||||
#define EXPAND(x) EXPAND_I(x)
|
||||
|
||||
#if !defined(UNUSED)
|
||||
#define UNUSED(x) (void)(x)
|
||||
#endif
|
||||
#define BUILD_BUG_ON(condition) ((void)sizeof(char[1 - 2*!!(condition)]))
|
||||
|
||||
#define BIT(x) (1 << (x))
|
||||
|
@ -45,7 +45,6 @@ http://resnet.uoregon.edu/~gurney_j/jmpc/bitwise.html
|
|||
#define BITCOUNT(x) (((BX_(x)+(BX_(x)>>4)) & 0x0F0F0F0F) % 255)
|
||||
#define BX_(x) ((x) - (((x)>>1)&0x77777777) - (((x)>>2)&0x33333333) - (((x)>>3)&0x11111111))
|
||||
|
||||
#define UNUSED(x) (void)(x)
|
||||
|
||||
/*
|
||||
* https://groups.google.com/forum/?hl=en#!msg/comp.lang.c/attFnqwhvGk/sGBKXvIkY3AJ
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue