|
@@ -35,7 +35,7 @@
|
35
|
35
|
#endif
|
36
|
36
|
|
37
|
37
|
inline void toggle_pins() {
|
38
|
|
- const bool I_flag = parser.boolval('I');
|
|
38
|
+ const bool ignore_protection = parser.boolval('I');
|
39
|
39
|
const int repeat = parser.intval('R', 1),
|
40
|
40
|
start = PARSED_PIN_INDEX('S', 0),
|
41
|
41
|
end = PARSED_PIN_INDEX('E', NUM_DIGITAL_PINS - 1),
|
|
@@ -43,14 +43,14 @@ inline void toggle_pins() {
|
43
|
43
|
|
44
|
44
|
for (uint8_t i = start; i <= end; i++) {
|
45
|
45
|
pin_t pin = GET_PIN_MAP_PIN(i);
|
46
|
|
- //report_pin_state_extended(pin, I_flag, false);
|
|
46
|
+ //report_pin_state_extended(pin, ignore_protection, false);
|
47
|
47
|
if (!VALID_PIN(pin)) continue;
|
48
|
|
- if (!I_flag && pin_is_protected(pin)) {
|
49
|
|
- report_pin_state_extended(pin, I_flag, true, "Untouched ");
|
|
48
|
+ if (!ignore_protection && pin_is_protected(pin)) {
|
|
49
|
+ report_pin_state_extended(pin, ignore_protection, true, "Untouched ");
|
50
|
50
|
SERIAL_EOL();
|
51
|
51
|
}
|
52
|
52
|
else {
|
53
|
|
- report_pin_state_extended(pin, I_flag, true, "Pulsing ");
|
|
53
|
+ report_pin_state_extended(pin, ignore_protection, true, "Pulsing ");
|
54
|
54
|
#if AVR_AT90USB1286_FAMILY // Teensy IDEs don't know about these pins so must use FASTIO
|
55
|
55
|
if (pin == TEENSY_E2) {
|
56
|
56
|
SET_OUTPUT(TEENSY_E2);
|
|
@@ -275,7 +275,7 @@ void GcodeSuite::M43() {
|
275
|
275
|
for (uint8_t i = first_pin; i <= last_pin; i++) {
|
276
|
276
|
pin_t pin = GET_PIN_MAP_PIN(i);
|
277
|
277
|
if (!VALID_PIN(pin)) continue;
|
278
|
|
- if (pin_is_protected(pin) && !ignore_protection) continue;
|
|
278
|
+ if (!ignore_protection && pin_is_protected(pin)) continue;
|
279
|
279
|
pinMode(pin, INPUT_PULLUP);
|
280
|
280
|
delay(1);
|
281
|
281
|
/*
|
|
@@ -295,7 +295,7 @@ void GcodeSuite::M43() {
|
295
|
295
|
for (uint8_t i = first_pin; i <= last_pin; i++) {
|
296
|
296
|
pin_t pin = GET_PIN_MAP_PIN(i);
|
297
|
297
|
if (!VALID_PIN(pin)) continue;
|
298
|
|
- if (pin_is_protected(pin) && !ignore_protection) continue;
|
|
298
|
+ if (!ignore_protection && pin_is_protected(pin)) continue;
|
299
|
299
|
const byte val =
|
300
|
300
|
/*
|
301
|
301
|
IS_ANALOG(pin)
|