|
@@ -50,6 +50,12 @@
|
50
|
50
|
#define GET_PIN_MAP_PIN_M43(Q) GET_PIN_MAP_PIN(Q)
|
51
|
51
|
#endif
|
52
|
52
|
|
|
53
|
+inline void _watchdog_reset() {
|
|
54
|
+ #if ENABLED(USE_WATCHDOG)
|
|
55
|
+ watchdog_reset();
|
|
56
|
+ #endif
|
|
57
|
+}
|
|
58
|
+
|
53
|
59
|
inline void toggle_pins() {
|
54
|
60
|
const bool ignore_protection = parser.boolval('I');
|
55
|
61
|
const int repeat = parser.intval('R', 1),
|
|
@@ -65,7 +71,7 @@ inline void toggle_pins() {
|
65
|
71
|
SERIAL_EOL();
|
66
|
72
|
}
|
67
|
73
|
else {
|
68
|
|
- watchdog_reset();
|
|
74
|
+ _watchdog_reset();
|
69
|
75
|
report_pin_state_extended(pin, ignore_protection, true, "Pulsing ");
|
70
|
76
|
#if AVR_AT90USB1286_FAMILY // Teensy IDEs don't know about these pins so must use FASTIO
|
71
|
77
|
if (pin == TEENSY_E2) {
|
|
@@ -89,10 +95,10 @@ inline void toggle_pins() {
|
89
|
95
|
{
|
90
|
96
|
pinMode(pin, OUTPUT);
|
91
|
97
|
for (int16_t j = 0; j < repeat; j++) {
|
92
|
|
- watchdog_reset(); extDigitalWrite(pin, 0); safe_delay(wait);
|
93
|
|
- watchdog_reset(); extDigitalWrite(pin, 1); safe_delay(wait);
|
94
|
|
- watchdog_reset(); extDigitalWrite(pin, 0); safe_delay(wait);
|
95
|
|
- watchdog_reset();
|
|
98
|
+ _watchdog_reset(); extDigitalWrite(pin, 0); safe_delay(wait);
|
|
99
|
+ _watchdog_reset(); extDigitalWrite(pin, 1); safe_delay(wait);
|
|
100
|
+ _watchdog_reset(); extDigitalWrite(pin, 0); safe_delay(wait);
|
|
101
|
+ _watchdog_reset();
|
96
|
102
|
}
|
97
|
103
|
}
|
98
|
104
|
}
|