Skip to content

Commit eb73cf7

Browse files
Use IRAM_ATTR, fixes #15
1 parent a40be01 commit eb73cf7

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

Encoder.h

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -210,7 +210,11 @@ class Encoder
210210
// update() is not meant to be called from outside Encoder,
211211
// but it is public to allow static interrupt routines.
212212
// DO NOT call update() directly from sketches.
213+
#if defined(IRAM_ATTR)
214+
static IRAM_ATTR void update(Encoder_internal_state_t *arg) {
215+
#else
213216
static void update(Encoder_internal_state_t *arg) {
217+
#endif
214218
#if defined(__AVR__)
215219
// The compiler believes this is just 1 line of code, so
216220
// it will inline this function into each interrupt

0 commit comments

Comments
 (0)