Skip to content

Commit

Permalink
SimpleFIFO.h
Browse files Browse the repository at this point in the history
enqueue: ICACHE_RAM_ATTR added to support usage via interrupt
  • Loading branch information
sidey79 committed Feb 15, 2020
1 parent 66ff333 commit 812b5e7
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
6 changes: 5 additions & 1 deletion src/_micro-api/libraries/SimpleFIFO/src/SimpleFIFO.h
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,11 @@ SimpleFIFO<T,rawSize>::SimpleFIFO() : size(rawSize) {
flush();
}
template<typename T, int rawSize>
bool SimpleFIFO<T,rawSize>::enqueue( T element ) {
#if defined(ESP32) || defined(ESP8266)
bool ICACHE_RAM_ATTR SimpleFIFO<T,rawSize>::enqueue( T element ) {
#else
bool SimpleFIFO<T,rawSize>::enqueue( T element ) {
#endif
if ( count() >= rawSize ) { return false; }
numberOfElements++;
nextIn %= size;
Expand Down
1 change: 0 additions & 1 deletion src/cc1101.h
Original file line number Diff line number Diff line change
Expand Up @@ -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[];



Expand Down

0 comments on commit 812b5e7

Please sign in to comment.