From 4445faaa3a6c97e709e3b195c1550b06068f2e2a Mon Sep 17 00:00:00 2001 From: Karl Fessel Date: Mon, 3 Feb 2020 14:14:15 +0100 Subject: [PATCH] core/shed: remove not needed bitarithm include add missing bitarithm.h is not needed for the interface of shed but may cause conflicts due to different definitions of SETBIT and CLRBIT common implementations are: (value, offset) xor (value, mask) bitarithm implements the later frac.c and nrf52/usbdev.c use bitarithm.h but where missing the include sam0/rtt.c defined a bit using mask from bitarithm, changed that to the soulution used in sam0/rtc.c --- core/include/sched.h | 1 - cpu/nrf52/periph/usbdev.c | 1 + cpu/sam0_common/periph/rtt.c | 3 ++- sys/frac/frac.c | 1 + 4 files changed, 4 insertions(+), 2 deletions(-) diff --git a/core/include/sched.h b/core/include/sched.h index 0328a2bc95..2511e0bb5e 100644 --- a/core/include/sched.h +++ b/core/include/sched.h @@ -82,7 +82,6 @@ #include #include "kernel_defines.h" -#include "bitarithm.h" #include "kernel_types.h" #include "native_sched.h" #include "clist.h" diff --git a/cpu/nrf52/periph/usbdev.c b/cpu/nrf52/periph/usbdev.c index 8e0b0a6be9..86e1ababf1 100644 --- a/cpu/nrf52/periph/usbdev.c +++ b/cpu/nrf52/periph/usbdev.c @@ -31,6 +31,7 @@ #include "periph/usbdev.h" #include "usb.h" #include "usb/descriptor.h" +#include "bitarithm.h" #define ENABLE_DEBUG (0) #include "debug.h" diff --git a/cpu/sam0_common/periph/rtt.c b/cpu/sam0_common/periph/rtt.c index 384ca92fd0..32dbab12e7 100644 --- a/cpu/sam0_common/periph/rtt.c +++ b/cpu/sam0_common/periph/rtt.c @@ -32,7 +32,8 @@ * effects, but simplifies the code. (This bit is always set on SAML21xxxxA) */ #ifndef RTC_MODE0_CTRLA_COUNTSYNC -#define RTC_MODE0_CTRLA_COUNTSYNC BIT15 +#define RTC_MODE0_CTRLA_COUNTSYNC_Pos 15 +#define RTC_MODE0_CTRLA_COUNTSYNC (0x1ul << RTC_MODE0_CTRLA_COUNTSYNC_Pos) #endif static rtt_cb_t _overflow_cb; diff --git a/sys/frac/frac.c b/sys/frac/frac.c index 35c69855e6..fe80afff91 100644 --- a/sys/frac/frac.c +++ b/sys/frac/frac.c @@ -19,6 +19,7 @@ #include #include "assert.h" #include "frac.h" +#include "bitarithm.h" #define ENABLE_DEBUG (0) #include "debug.h"