From 812b5e790152dadad6320c7e62d1e82959b44a68 Mon Sep 17 00:00:00 2001 From: sidey79 <7968127+sidey79@users.noreply.github.com> Date: Sat, 15 Feb 2020 23:07:30 +0100 Subject: [PATCH] SimpleFIFO.h enqueue: ICACHE_RAM_ATTR added to support usage via interrupt --- src/_micro-api/libraries/SimpleFIFO/src/SimpleFIFO.h | 6 +++++- src/cc1101.h | 1 - 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/src/_micro-api/libraries/SimpleFIFO/src/SimpleFIFO.h b/src/_micro-api/libraries/SimpleFIFO/src/SimpleFIFO.h index 87540511..fbc7110c 100644 --- a/src/_micro-api/libraries/SimpleFIFO/src/SimpleFIFO.h +++ b/src/_micro-api/libraries/SimpleFIFO/src/SimpleFIFO.h @@ -74,7 +74,11 @@ SimpleFIFO::SimpleFIFO() : size(rawSize) { flush(); } template -bool SimpleFIFO::enqueue( T element ) { +#if defined(ESP32) || defined(ESP8266) +bool ICACHE_RAM_ATTR SimpleFIFO::enqueue( T element ) { +#else +bool SimpleFIFO::enqueue( T element ) { +#endif if ( count() >= rawSize ) { return false; } numberOfElements++; nextIn %= size; diff --git a/src/cc1101.h b/src/cc1101.h index f44eee90..b3af4438 100644 --- a/src/cc1101.h +++ b/src/cc1101.h @@ -155,7 +155,6 @@ namespace cc1101 { #ifdef ARDUINO_AVR_ICT_BOARDS_ICT_BOARDS_AVR_RADINOCC1101 //uint8_t RADINOVARIANT = 0; // Standardwert welcher je radinoVarinat ge寀ert wird #endif - extern const uint8_t initVal[];