From 807f01ba72ced995b092b60bb1d5c0bed4d60ebf Mon Sep 17 00:00:00 2001 From: Geoffrey Merck Date: Sun, 10 May 2020 07:00:58 +0200 Subject: [PATCH] Get rid of annoying PI warning --- Globals.h | 1 + RingBuffer.h | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/Globals.h b/Globals.h index 5cb147a..9a6bbf8 100644 --- a/Globals.h +++ b/Globals.h @@ -28,6 +28,7 @@ #include "STM32Utils.h" #else #include +#undef PI //Undefine PI to get rid of annoying warning as it is also defined in arm_math.h. #endif #if defined(__SAM3X8E__) || defined(STM32F105xC) diff --git a/RingBuffer.h b/RingBuffer.h index c69a470..7615de0 100644 --- a/RingBuffer.h +++ b/RingBuffer.h @@ -20,7 +20,6 @@ #if !defined(RINGBUFFER_H) #define RINGBUFFER_H - #if defined(STM32F4XX) #include "stm32f4xx.h" #elif defined(STM32F7XX) @@ -30,6 +29,7 @@ #include #else #include +#undef PI #endif #if defined(__SAM3X8E__) || defined(STM32F105xC) @@ -56,7 +56,7 @@ public: bool put(TDATATYPE item) volatile; bool get(TDATATYPE& item); - + TDATATYPE peek() const; bool hasOverflowed();