Update recovery_service.cpp

Add some sanity check for pin definition
This commit is contained in:
Luc 2022-06-17 15:35:47 +08:00
parent 3b3e03c3e5
commit c09ec2c7a2

View File

@ -57,7 +57,8 @@ void handlePinResetInterrupt()
bool RecoveryService::begin() {
bool res = true;
end();
#ifdef PIN_RESET_FEATURE
#if defined (PIN_RESET_FEATURE)
#if defined(ESP3D_RESET_PIN) && ESP3D_RESET_PIN !=-1
pinMode(ESP3D_RESET_PIN, INPUT_PULLUP);
attachInterrupt(digitalPinToInterrupt(ESP3D_RESET_PIN), handlePinResetInterrupt, FALLING);
#endif //PIN_RESET_FEATURE