Skip to content

Commit

Permalink
Fix for ESP8266
Browse files Browse the repository at this point in the history
  • Loading branch information
PaulStoffregen committed Jun 25, 2019
1 parent 5ccb951 commit 26b691b
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 4 deletions.
5 changes: 1 addition & 4 deletions XPT2046_Touchscreen.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -43,11 +43,8 @@ bool XPT2046_Touchscreen::begin()
return true;
}

#ifdef ESP32
void IRAM_ATTR isrPin( void )
#else
ISR_PREFIX
void isrPin( void )
#endif
{
XPT2046_Touchscreen *o = isrPinptr;
o->isrWake = true;
Expand Down
11 changes: 11 additions & 0 deletions XPT2046_Touchscreen.h
Original file line number Diff line number Diff line change
Expand Up @@ -61,4 +61,15 @@ class XPT2046_Touchscreen {
uint32_t msraw=0x80000000;
};

#ifndef ISR_PREFIX
#if defined(ESP8266)
#define ISR_PREFIX ICACHE_RAM_ATTR
#elif defined(ESP32)
// TODO: should this also be ICACHE_RAM_ATTR ??

This comment has been minimized.

Copy link
@marcelstoer

marcelstoer Jun 25, 2019

That's what I wondered as well when I looked at PR #17 from @CelliesProjects.

#define ISR_PREFIX IRAM_ATTR
#else
#define ISR_PREFIX
#endif
#endif

#endif

0 comments on commit 26b691b

Please sign in to comment.