| 378 | } |
| 379 | |
| 380 | void LoRaClass::onTxDone(void(*callback)()) |
| 381 | { |
| 382 | _onTxDone = callback; |
| 383 | |
| 384 | if (callback) { |
| 385 | pinMode(_dio0, INPUT); |
| 386 | #ifdef SPI_HAS_NOTUSINGINTERRUPT |
| 387 | SPI.usingInterrupt(digitalPinToInterrupt(_dio0)); |
| 388 | #endif |
| 389 | attachInterrupt(digitalPinToInterrupt(_dio0), LoRaClass::onDio0Rise, RISING); |
| 390 | } else { |
| 391 | detachInterrupt(digitalPinToInterrupt(_dio0)); |
| 392 | #ifdef SPI_HAS_NOTUSINGINTERRUPT |
| 393 | SPI.notUsingInterrupt(digitalPinToInterrupt(_dio0)); |
| 394 | #endif |
| 395 | } |
| 396 | } |
| 397 | |
| 398 | void LoRaClass::receive(int size) |
| 399 | { |
nothing calls this directly
no outgoing calls
no test coverage detected