From 536c64a4989ab1f0f493b307fe873c6588686849 Mon Sep 17 00:00:00 2001 From: iabdalkader Date: Thu, 2 Mar 2023 13:27:19 +0100 Subject: [PATCH] Fix library build for the M4 core. --- src/Arduino_AdvancedAnalog.h | 4 ---- src/DMABuffer.h | 4 ++++ 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/Arduino_AdvancedAnalog.h b/src/Arduino_AdvancedAnalog.h index 6aec2b3..f654650 100644 --- a/src/Arduino_AdvancedAnalog.h +++ b/src/Arduino_AdvancedAnalog.h @@ -24,10 +24,6 @@ * INCLUDE **************************************************************************************/ -#ifdef ARDUINO_PORTENTA_H7_M4 -# error "This library only works on the M7 core of any STM32H747 based board (Portenta H7, Giga)." -#endif - #include "AdvancedADC.h" #include "AdvancedDAC.h" diff --git a/src/DMABuffer.h b/src/DMABuffer.h index ac85ccd..0f495df 100644 --- a/src/DMABuffer.h +++ b/src/DMABuffer.h @@ -92,15 +92,19 @@ template class DMABuffer { } void flush() { + #if __DCACHE_PRESENT if (ptr) { SCB_CleanDCache_by_Addr(data(), bytes()); } + #endif } void invalidate() { + #if __DCACHE_PRESENT if (ptr) { SCB_InvalidateDCache_by_Addr(data(), bytes()); } + #endif } uint32_t timestamp() {