From 899f992d112b4adcb46227deaf41498d397819b9 Mon Sep 17 00:00:00 2001 From: Marcelo Aquino Date: Mon, 8 Aug 2016 19:37:08 -0300 Subject: [PATCH] Fix Doxygen preprocessor variable * Fix build error when not using RF24 interrupt pin --- core/MyHwLinuxGeneric.h | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/core/MyHwLinuxGeneric.h b/core/MyHwLinuxGeneric.h index 32e8406..cb01c78 100644 --- a/core/MyHwLinuxGeneric.h +++ b/core/MyHwLinuxGeneric.h @@ -54,19 +54,23 @@ static __inline__ void __hwLock() { } #endif -#if defined(__DOXYGEN__) +#if defined(DOXYGEN) #define ATOMIC_BLOCK_CLEANUP #elif defined(MY_RF24_IRQ_PIN) #define ATOMIC_BLOCK_CLEANUP uint8_t __atomic_loop \ __attribute__((__cleanup__( __hwUnlock ))) = 1 -#endif /* __DOXYGEN__ */ +#else + #define ATOMIC_BLOCK_CLEANUP +#endif /* DOXYGEN */ -#if defined(__DOXYGEN__) +#if defined(DOXYGEN) #define ATOMIC_BLOCK #elif defined(MY_RF24_IRQ_PIN) #define ATOMIC_BLOCK for ( ATOMIC_BLOCK_CLEANUP, __hwLock(); \ __atomic_loop ; __atomic_loop = 0 ) -#endif /* __DOXYGEN__ */ +#else + #define ATOMIC_BLOCK +#endif /* DOXYGEN */ #ifndef DOXYGEN #define MY_CRITICAL_SECTION ATOMIC_BLOCK