| 360 | |
| 361 | #ifndef ARDUINO_SAMD_MKRWAN1300 |
| 362 | void LoRaClass::onReceive(void(*callback)(int)) |
| 363 | { |
| 364 | _onReceive = callback; |
| 365 | |
| 366 | if (callback) { |
| 367 | pinMode(_dio0, INPUT); |
| 368 | #ifdef SPI_HAS_NOTUSINGINTERRUPT |
| 369 | SPI.usingInterrupt(digitalPinToInterrupt(_dio0)); |
| 370 | #endif |
| 371 | attachInterrupt(digitalPinToInterrupt(_dio0), LoRaClass::onDio0Rise, RISING); |
| 372 | } else { |
| 373 | detachInterrupt(digitalPinToInterrupt(_dio0)); |
| 374 | #ifdef SPI_HAS_NOTUSINGINTERRUPT |
| 375 | SPI.notUsingInterrupt(digitalPinToInterrupt(_dio0)); |
| 376 | #endif |
| 377 | } |
| 378 | } |
| 379 | |
| 380 | void LoRaClass::onTxDone(void(*callback)()) |
| 381 | { |
nothing calls this directly
no outgoing calls
no test coverage detected