diff --git a/src/main.cpp b/src/main.cpp index ba87add..ac6c88e 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -2278,7 +2278,7 @@ void gotoLPCD() { if (nfc.switchToLPCD(wakeupCounterInMs)) { Serial.println(F("switch to low power card detection: success")); // configure wakeup pin for deep-sleep wake-up, use ext1 - esp_sleep_enable_ext1_wakeup(BUTTON_PIN_BITMASK, ESP_EXT1_WAKEUP_ANY_HIGH); + esp_sleep_enable_ext1_wakeup((1ULL<<(RFID_IRQ)), ESP_EXT1_WAKEUP_ANY_HIGH); // freeze pin states in deep sleep gpio_hold_en(gpio_num_t(RFID_CS)); // CS/NSS gpio_hold_en(gpio_num_t(RFID_RST)); // RST @@ -4117,7 +4117,7 @@ void printWakeUpReason() { if (nfc14443.switchToLPCD(wakeupCounterInMs)) { loggerNl(serialDebug, (char *) FPSTR(lowPowerCardSuccess), LOGLEVEL_INFO); // configure wakeup pin for deep-sleep wake-up, use ext1 - esp_sleep_enable_ext1_wakeup(BUTTON_PIN_BITMASK, ESP_EXT1_WAKEUP_ANY_HIGH); + esp_sleep_enable_ext1_wakeup((1ULL<<(RFID_IRQ)), ESP_EXT1_WAKEUP_ANY_HIGH); // freeze pin states in deep sleep gpio_hold_en(gpio_num_t(RFID_CS)); // CS/NSS gpio_hold_en(gpio_num_t(RFID_RST)); // RST diff --git a/src/settings-custom.h b/src/settings-custom.h index 220c6c2..36d9929 100644 --- a/src/settings-custom.h +++ b/src/settings-custom.h @@ -37,7 +37,6 @@ #define RFID_BUSY 16 // PN5180 BUSY PIN #define RFID_RST 22 // PN5180 RESET PIN #define RFID_IRQ 39 // PN5180 IRQ PIN (only needed for low power card detection) - #define BUTTON_PIN_BITMASK 0x8000000000// 2^RFID_IRQ in hex #endif // I2S (DAC) #define I2S_DOUT 25 // Digital out (I2S) diff --git a/src/settings-lolin32.h b/src/settings-lolin32.h index c50570f..43c6853 100644 --- a/src/settings-lolin32.h +++ b/src/settings-lolin32.h @@ -43,7 +43,6 @@ #define RFID_BUSY 16 // PN5180 BUSY PIN #define RFID_RST 22 // PN5180 RESET PIN #define RFID_IRQ 39 // PN5180 IRQ PIN (only needed for low power card detection) - #define BUTTON_PIN_BITMASK 0x8000000000// 2^RFID_IRQ in hex #endif // I2S (DAC) #define I2S_DOUT 25 // Digital out (I2S) diff --git a/src/settings-lolin_d32.h b/src/settings-lolin_d32.h index 0a1bb70..d9b7fea 100644 --- a/src/settings-lolin_d32.h +++ b/src/settings-lolin_d32.h @@ -44,7 +44,6 @@ #define RFID_BUSY 16 // PN5180 BUSY PIN #define RFID_RST 22 // PN5180 RESET PIN #define RFID_IRQ 39 // PN5180 IRQ PIN (only needed for low power card detection) - #define BUTTON_PIN_BITMASK 0x8000000000// 2^RFID_IRQ in hex #endif // I2S (DAC) #define I2S_DOUT 25 // Digital out (I2S) diff --git a/src/settings-lolin_d32_pro.h b/src/settings-lolin_d32_pro.h index faf26f9..2467b15 100644 --- a/src/settings-lolin_d32_pro.h +++ b/src/settings-lolin_d32_pro.h @@ -39,7 +39,6 @@ #define RFID_BUSY 33 // PN5180 BUSY PIN #define RFID_RST 22 // PN5180 RESET PIN #define RFID_IRQ 39 // PN5180 IRQ PIN (only needed for low power card detection) - #define BUTTON_PIN_BITMASK 0x8000000000// 2^RFID_IRQ in hex #endif // I2S (DAC) #define I2S_DOUT 25 // Digital out (I2S)