Skip to content

Commit 996d8fc

Browse files
committed
Fixed samples for ESP8266
1 parent 6e26458 commit 996d8fc

File tree

4 files changed

+8
-4
lines changed

4 files changed

+8
-4
lines changed

examples/OpenThermGatewayMonitor_Demo/OpenThermGatewayMonitor_Demo.ino

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,11 +18,11 @@ const int sOutPin = 5; //for Arduino, 13 for ESP8266
1818
OpenTherm mOT(mInPin, mOutPin);
1919
OpenTherm sOT(sInPin, sOutPin, true);
2020

21-
void mHandleInterrupt() {
21+
void ICACHE_RAM_ATTR mHandleInterrupt() {
2222
mOT.handleInterrupt();
2323
}
2424

25-
void sHandleInterrupt() {
25+
void ICACHE_RAM_ATTR sHandleInterrupt() {
2626
sOT.handleInterrupt();
2727
}
2828

examples/OpenThermMaster_Demo/OpenThermMaster_Demo.ino

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ const int inPin = 2; //for Arduino, 4 for ESP8266
2727
const int outPin = 3; //for Arduino, 5 for ESP8266
2828
OpenTherm ot(inPin, outPin);
2929

30-
void handleInterrupt() {
30+
void ICACHE_RAM_ATTR handleInterrupt() {
3131
ot.handleInterrupt();
3232
}
3333

examples/OpenThermSlave_Demo/OpenThermSlave_Demo.ino

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ const int inPin = 2; //for Arduino, 12 for ESP8266
1212
const int outPin = 3; //for Arduino, 13 for ESP8266
1313
OpenTherm ot(inPin, outPin, true);
1414

15-
void handleInterrupt() {
15+
void ICACHE_RAM_ATTR handleInterrupt() {
1616
ot.handleInterrupt();
1717
}
1818

src/OpenTherm.h

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -177,4 +177,8 @@ class OpenTherm
177177
float getBoilerTemperature();
178178
};
179179

180+
#ifndef ICACHE_RAM_ATTR
181+
#define ICACHE_RAM_ATTR
182+
#endif
183+
180184
#endif // OpenTherm_h

0 commit comments

Comments
 (0)