Skip to content

Commit

Permalink
Fixed samples for ESP8266
Browse files Browse the repository at this point in the history
  • Loading branch information
ihormelnyk committed Aug 26, 2019
1 parent 6e26458 commit 996d8fc
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,11 @@ const int sOutPin = 5; //for Arduino, 13 for ESP8266
OpenTherm mOT(mInPin, mOutPin);
OpenTherm sOT(sInPin, sOutPin, true);

void mHandleInterrupt() {
void ICACHE_RAM_ATTR mHandleInterrupt() {
mOT.handleInterrupt();
}

void sHandleInterrupt() {
void ICACHE_RAM_ATTR sHandleInterrupt() {
sOT.handleInterrupt();
}

Expand Down
2 changes: 1 addition & 1 deletion examples/OpenThermMaster_Demo/OpenThermMaster_Demo.ino
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ const int inPin = 2; //for Arduino, 4 for ESP8266
const int outPin = 3; //for Arduino, 5 for ESP8266
OpenTherm ot(inPin, outPin);

void handleInterrupt() {
void ICACHE_RAM_ATTR handleInterrupt() {
ot.handleInterrupt();
}

Expand Down
2 changes: 1 addition & 1 deletion examples/OpenThermSlave_Demo/OpenThermSlave_Demo.ino
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ const int inPin = 2; //for Arduino, 12 for ESP8266
const int outPin = 3; //for Arduino, 13 for ESP8266
OpenTherm ot(inPin, outPin, true);

void handleInterrupt() {
void ICACHE_RAM_ATTR handleInterrupt() {
ot.handleInterrupt();
}

Expand Down
4 changes: 4 additions & 0 deletions src/OpenTherm.h
Original file line number Diff line number Diff line change
Expand Up @@ -177,4 +177,8 @@ class OpenTherm
float getBoilerTemperature();
};

#ifndef ICACHE_RAM_ATTR
#define ICACHE_RAM_ATTR
#endif

#endif // OpenTherm_h

0 comments on commit 996d8fc

Please sign in to comment.