Skip to content

Commit 0c9bb95

Browse files
committed
getIRQGpio() returns default DIO1 at ESP32Board and NRF52Board
1 parent 26c09c4 commit 0c9bb95

3 files changed

Lines changed: 6 additions & 1 deletion

File tree

src/MeshCore.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ class MainBoard {
5151
virtual void onAfterTransmit() { }
5252
virtual void reboot() = 0;
5353
virtual void powerOff() { /* no op */ }
54-
virtual uint32_t getIRQGpio() { return P_LORA_DIO_1; } // default for SX1262
54+
virtual uint32_t getIRQGpio() { return -1; } // not supported. DIO1 (SX1262) and DIO0 (SX127x)
5555
virtual bool safeToSleep() { return false; }
5656
virtual void sleep(uint32_t secs) { /* no op */ }
5757
virtual uint32_t getGpio() { return 0; }

src/helpers/ESP32Board.h

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,10 @@ class ESP32Board : public mesh::MainBoard {
5656
return raw / 4;
5757
}
5858

59+
uint32_t getIRQGpio() {
60+
return P_LORA_DIO_1; // default for SX1262
61+
}
62+
5963
bool safeToSleep() {
6064
// Check for RX status
6165
gpio_num_t wakeupPin = (gpio_num_t)getIRQGpio();

src/helpers/NRF52Board.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,7 @@ class NRF52Board : public mesh::MainBoard {
6161
const char* getShutdownReasonString(uint8_t reason) override;
6262
#endif
6363

64+
uint32_t getIRQGpio() { return P_LORA_DIO_1; } // default for SX1262
6465
virtual bool safeToSleep() override;
6566
virtual void sleep(uint32_t secs) override;
6667
};

0 commit comments

Comments
 (0)