Skip to content

Commit 9e928e4

Browse files
committed
drivers: add modules.h for IS_USED macro
Fix compilation errors on native boards caused by missing modules.h include in driver headers that use IS_USED() in preprocessor directives. The IS_USED macro is defined in modules.h and must be included in any header file that uses it in #if directives. Error: "missing binary operator before token '('" Signed-off-by: Gilles DOFFE <[email protected]>
1 parent e1b2d5c commit 9e928e4

File tree

3 files changed

+3
-0
lines changed

3 files changed

+3
-0
lines changed

drivers/include/hm330x.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@
3232
* @author Francisco Molina <[email protected]>
3333
*/
3434

35+
#include "modules.h"
3536
#include "periph/i2c.h"
3637
#include "periph/gpio.h"
3738

drivers/include/mcp23x17.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -346,6 +346,7 @@
346346
extern "C" {
347347
#endif
348348

349+
#include "modules.h"
349350
#include "periph/gpio.h"
350351
#include "periph/i2c.h"
351352
#include "periph/spi.h"

drivers/include/vl6180x.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -400,6 +400,7 @@ extern "C"
400400
#include <stdbool.h>
401401
#include <stdint.h>
402402

403+
#include "modules.h"
403404
#include "periph/gpio.h"
404405
#include "periph/i2c.h"
405406

0 commit comments

Comments
 (0)