1
0
mirror of https://github.com/sandeepmistry/arduino-LoRa.git synced 2025-04-19 13:02:14 +03:00

Only call SPI.usingInterrupt if SPI_HAS_NOTUSINGINTERRUPT is defined

This commit is contained in:
Sandeep Mistry 2018-02-15 21:14:03 -05:00
parent 3ec90c02b4
commit f5cae9c25d

View File

@ -282,8 +282,9 @@ void LoRaClass::onReceive(void(*callback)(int))
pinMode(_dio0, INPUT);
writeRegister(REG_DIO_MAPPING_1, 0x00);
#ifdef SPI_HAS_NOTUSINGINTERRUPT
SPI.usingInterrupt(digitalPinToInterrupt(_dio0));
#endif
attachInterrupt(digitalPinToInterrupt(_dio0), LoRaClass::onDio0Rise, RISING);
} else {
detachInterrupt(digitalPinToInterrupt(_dio0));