mirror of
https://git.mirrors.martin98.com/https://github.com/luc-github/ESP3D.git
synced 2025-08-04 13:40:36 +08:00
Update recovery_service.cpp
Add some sanity check for pin definition
This commit is contained in:
parent
3b3e03c3e5
commit
c09ec2c7a2
@ -57,7 +57,8 @@ void handlePinResetInterrupt()
|
|||||||
bool RecoveryService::begin() {
|
bool RecoveryService::begin() {
|
||||||
bool res = true;
|
bool res = true;
|
||||||
end();
|
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);
|
pinMode(ESP3D_RESET_PIN, INPUT_PULLUP);
|
||||||
attachInterrupt(digitalPinToInterrupt(ESP3D_RESET_PIN), handlePinResetInterrupt, FALLING);
|
attachInterrupt(digitalPinToInterrupt(ESP3D_RESET_PIN), handlePinResetInterrupt, FALLING);
|
||||||
#endif //PIN_RESET_FEATURE
|
#endif //PIN_RESET_FEATURE
|
||||||
|
Loading…
x
Reference in New Issue
Block a user