Allow code to compile on esp8266
This commit is contained in:
parent
7115cad933
commit
cc0122c4ff
1 changed files with 2 additions and 0 deletions
|
|
@ -265,7 +265,9 @@ void MCP2515Class::onReceive(void(*callback)(int))
|
|||
pinMode(_intPin, INPUT);
|
||||
|
||||
if (callback) {
|
||||
#ifndef ESP8266
|
||||
SPI.usingInterrupt(digitalPinToInterrupt(_intPin));
|
||||
#endif
|
||||
attachInterrupt(digitalPinToInterrupt(_intPin), MCP2515Class::onInterrupt, LOW);
|
||||
} else {
|
||||
detachInterrupt(digitalPinToInterrupt(_intPin));
|
||||
|
|
|
|||
Loading…
Reference in a new issue