Skip to content

Commit 3d093e6

Browse files
kvoitmfalkvidd
authored andcommitted
Fix default IRQ pins on ESP8266 that prevent MCU from boot (#1076)
* Derive default interrupt from configured instead of default pin Derive DEFAULT_RFM69_IRQ_NUM from MY_RFM69_IRQ_PIN instead of DEFAULT_RFM69_IRQ_PIN so that _NUM does not have to be defined if _PIN is redefined * Change default IRQ pin for RFM69/95 on ESP8266 to GPIO5=D1 The originally defined pin GPIO2 prevent ESP8266 from booting, since it has to be pulled high for booting and DIO0 from the RFM69 is defaul low. For this reason, it is improbably that anyone is using the default and would be affected by this change.
1 parent 3f2d292 commit 3d093e6

File tree

3 files changed

+7
-7
lines changed

3 files changed

+7
-7
lines changed

drivers/RFM69/new/RFM69_new.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@
7878
#define DEFAULT_RFM69_IRQ_PIN (2) //!< DEFAULT_RFM69_IRQ_PIN
7979
#endif
8080
#elif defined(ARDUINO_ARCH_ESP8266)
81-
#define DEFAULT_RFM69_IRQ_PIN (2) //!< DEFAULT_RFM69_IRQ_PIN
81+
#define DEFAULT_RFM69_IRQ_PIN (5) //!< DEFAULT_RFM69_IRQ_PIN
8282
#elif defined(ARDUINO_ARCH_ESP32)
8383
#warning not implemented yet
8484
#elif defined(ARDUINO_ARCH_SAMD)

drivers/RFM69/old/RFM69_old.h

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -41,15 +41,15 @@
4141
#else
4242
#define DEFAULT_RFM69_IRQ_PIN (2) //!< DEFAULT_RFM69_IRQ_PIN
4343
#endif
44-
#define DEFAULT_RFM69_IRQ_NUM digitalPinToInterrupt(DEFAULT_RFM69_IRQ_PIN) //!< DEFAULT_RFM69_IRQ_NUM
44+
#define DEFAULT_RFM69_IRQ_NUM digitalPinToInterrupt(MY_RFM69_IRQ_PIN) //!< DEFAULT_RFM69_IRQ_NUM
4545
#elif defined(ARDUINO_ARCH_ESP8266)
46-
#define DEFAULT_RFM69_IRQ_PIN (2) //!< DEFAULT_RFM69_IRQ_PIN
47-
#define DEFAULT_RFM69_IRQ_NUM digitalPinToInterrupt(DEFAULT_RFM69_IRQ_PIN) //!< DEFAULT_RFM69_IRQ_NUM
46+
#define DEFAULT_RFM69_IRQ_PIN (5) //!< DEFAULT_RFM69_IRQ_PIN
47+
#define DEFAULT_RFM69_IRQ_NUM digitalPinToInterrupt(MY_RFM69_IRQ_PIN) //!< DEFAULT_RFM69_IRQ_NUM
4848
#elif defined(ARDUINO_ARCH_ESP32)
4949
#warning not implemented yet
5050
#elif defined(ARDUINO_ARCH_SAMD)
5151
#define DEFAULT_RFM69_IRQ_PIN (2) //!< DEFAULT_RFM69_IRQ_PIN
52-
#define DEFAULT_RFM69_IRQ_NUM digitalPinToInterrupt(DEFAULT_RFM69_IRQ_PIN) //!< DEFAULT_RFM69_IRQ_NUM
52+
#define DEFAULT_RFM69_IRQ_NUM digitalPinToInterrupt(MY_RFM69_IRQ_PIN) //!< DEFAULT_RFM69_IRQ_NUM
5353
#elif defined(LINUX_ARCH_RASPBERRYPI)
5454
#define DEFAULT_RFM69_IRQ_PIN (22) //!< DEFAULT_RFM69_IRQ_PIN
5555
#define DEFAULT_RFM69_IRQ_NUM DEFAULT_RFM69_IRQ_PIN //!< DEFAULT_RFM69_IRQ_NUM
@@ -58,7 +58,7 @@
5858
#define DEFAULT_RFM69_IRQ_NUM DEFAULT_RFM69_IRQ_PIN //!< DEFAULT_RFM69_IRQ_NUM
5959
#elif defined(TEENSYDUINO)
6060
#define DEFAULT_RFM69_IRQ_PIN (8) //!< DEFAULT_RFM69_IRQ_PIN
61-
#define DEFAULT_RFM69_IRQ_NUM digitalPinToInterrupt(DEFAULT_RFM69_IRQ_PIN) //!< DEFAULT_RFM69_IRQ_NUM
61+
#define DEFAULT_RFM69_IRQ_NUM digitalPinToInterrupt(MY_RFM69_IRQ_PIN) //!< DEFAULT_RFM69_IRQ_NUM
6262
#else
6363
#define DEFAULT_RFM69_IRQ_PIN (2) //!< DEFAULT_RFM69_IRQ_PIN
6464
#define DEFAULT_RFM69_IRQ_NUM (2) //!< DEFAULT_RFM69_IRQ_NUM

drivers/RFM95/RFM95.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@
8989
#define DEFAULT_RFM95_IRQ_PIN (2) //!< DEFAULT_RFM95_IRQ_PIN
9090
#endif
9191
#elif defined(ARDUINO_ARCH_ESP8266)
92-
#define DEFAULT_RFM95_IRQ_PIN (2) //!< DEFAULT_RFM95_IRQ_PIN
92+
#define DEFAULT_RFM95_IRQ_PIN (5) //!< DEFAULT_RFM95_IRQ_PIN
9393
#elif defined(ARDUINO_ARCH_ESP32)
9494
#warning not implemented yet
9595
#elif defined(ARDUINO_ARCH_SAMD)

0 commit comments

Comments
 (0)