Skip to content

Commit f5cae9c

Browse files
committed
Only call SPI.usingInterrupt if SPI_HAS_NOTUSINGINTERRUPT is defined
1 parent 3ec90c0 commit f5cae9c

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/LoRa.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -282,8 +282,9 @@ void LoRaClass::onReceive(void(*callback)(int))
282282
pinMode(_dio0, INPUT);
283283

284284
writeRegister(REG_DIO_MAPPING_1, 0x00);
285-
285+
#ifdef SPI_HAS_NOTUSINGINTERRUPT
286286
SPI.usingInterrupt(digitalPinToInterrupt(_dio0));
287+
#endif
287288
attachInterrupt(digitalPinToInterrupt(_dio0), LoRaClass::onDio0Rise, RISING);
288289
} else {
289290
detachInterrupt(digitalPinToInterrupt(_dio0));

0 commit comments

Comments
 (0)