Allow code to compile on esp8266

This commit is contained in:
Jeff Epler 2020-11-05 09:08:45 -06:00
parent 7115cad933
commit cc0122c4ff

View file

@ -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));