Skip to content

Commit a93fced

Browse files
committed
Add condition for ESP32 platform for IRAM_ATTR
1 parent dcd09ed commit a93fced

File tree

2 files changed

+7
-2
lines changed

2 files changed

+7
-2
lines changed

SensorT25.cpp

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ v0.4.1 - rename BIT0 and 1 to TBIT0 and 1, user IRAM_ATTR for IRQ handler
1818
v0.4.2 - ESP32 is not supporting float in IRQ handler, use int instead
1919
v1.1.0 - sync version with git releases
2020
v1.1.2 - add again IRAM_ATTR for _irqHandler function
21+
v1.1.3 - add condition for ESP32 and other platforms for IRAM_ATTR
2122
*/
2223

2324
#include <SensorT25.h>
@@ -124,7 +125,11 @@ int SensorT25::_idecodeTemp(unsigned long buffer)
124125
}
125126

126127
// IRQ handler for decode bits ...
127-
void IRAM_ATTR SensorT25::_irqHandler()
128+
#ifdef ESP32
129+
void IRAM_ATTR SensorT25::_irqHandler()
130+
#else
131+
void SensorT25::_irqHandler()
132+
#endif
128133
{
129134
unsigned long currentTime = micros(); // shot time
130135
int duration = currentTime - _lastTime; // calculate duration

library.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
"email": "dev@miklik.cz",
1212
"maintainer": true
1313
},
14-
"version": "1.1.2",
14+
"version": "1.1.3",
1515
"frameworks": "arduino",
1616
"platforms": "*"
1717
}

0 commit comments

Comments
 (0)