Browse Source

Fixing issue if PN5180 is active but without LPCD

master
Torsten Stauder 5 years ago
parent
commit
eacca13ad3
  1. 10
      src/main.cpp

10
src/main.cpp

@ -1953,7 +1953,7 @@ void rfidScanner(void *parameter) {
} }
} }
} }
Serial.println("delete RFID scanner task");
//Serial.println("deleted RFID scanner-task");
vTaskDelete(NULL); vTaskDelete(NULL);
} }
#endif #endif
@ -3766,9 +3766,8 @@ void handleUpload(AsyncWebServerRequest *request, String filename, size_t index,
#endif #endif
} }
#ifdef PN5180_ENABLE_LPCD
// Print the wake-up reason why ESP32 is awake now
void printWakeUpReason() {
// Print the wake-up reason why ESP32 is awake now
void printWakeUpReason() {
esp_sleep_wakeup_cause_t wakeup_reason; esp_sleep_wakeup_cause_t wakeup_reason;
wakeup_reason = esp_sleep_get_wakeup_cause(); wakeup_reason = esp_sleep_get_wakeup_cause();
@ -3780,8 +3779,9 @@ void handleUpload(AsyncWebServerRequest *request, String filename, size_t index,
case ESP_SLEEP_WAKEUP_ULP : Serial.println(F("Wakeup caused by ULP program")); break; case ESP_SLEEP_WAKEUP_ULP : Serial.println(F("Wakeup caused by ULP program")); break;
default : Serial.printf("Wakeup was not caused by deep sleep: %d\n", wakeup_reason); break; default : Serial.printf("Wakeup was not caused by deep sleep: %d\n", wakeup_reason); break;
} }
}
}
#ifdef PN5180_ENABLE_LPCD
// wake up from LPCD, check card is present. This works only for ISO-14443 compatible cards // wake up from LPCD, check card is present. This works only for ISO-14443 compatible cards
void checkCardIsPresentLPCD() { void checkCardIsPresentLPCD() {
static PN5180ISO14443 nfc14443(RFID_CS, RFID_BUSY, RFID_RST); static PN5180ISO14443 nfc14443(RFID_CS, RFID_BUSY, RFID_RST);

Loading…
Cancel
Save