From 31514f453a9f6315988db266249a8fcb65029715 Mon Sep 17 00:00:00 2001 From: Ben Lye Date: Tue, 27 Jun 2017 08:04:40 +0100 Subject: [PATCH] Fix #ifdef AVR_AT90USB1286_FAMILY in pinsDebug Can't compile with PINS_DEBUGING enabled on Atmega1284p because it tries to enumerate pins 46 and 47 (which don't exist) because `#ifdef AVR_AT90USB1286_FAMILY ` doesn't work as expected. --- Marlin/Marlin_main.cpp | 2 +- Marlin/pinsDebug.h | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Marlin/Marlin_main.cpp b/Marlin/Marlin_main.cpp index bf5ab60467..0cb56afa17 100644 --- a/Marlin/Marlin_main.cpp +++ b/Marlin/Marlin_main.cpp @@ -6438,7 +6438,7 @@ inline void gcode_M42() { } else { report_pin_state_extended(pin, I_flag, true, "Pulsing "); - #ifdef AVR_AT90USB1286_FAMILY // Teensy IDEs don't know about these pins so must use FASTIO + #if AVR_AT90USB1286_FAMILY // Teensy IDEs don't know about these pins so must use FASTIO if (pin == 46) { SET_OUTPUT(46); for (int16_t j = 0; j < repeat; j++) { diff --git a/Marlin/pinsDebug.h b/Marlin/pinsDebug.h index 3e978ecb85..d1390e740d 100644 --- a/Marlin/pinsDebug.h +++ b/Marlin/pinsDebug.h @@ -484,7 +484,7 @@ inline void report_pin_state_extended(int8_t pin, bool ignore, bool extended = f if (pin_is_protected(pin) && !ignore) SERIAL_ECHOPGM("protected "); else { - #ifdef AVR_AT90USB1286_FAMILY //Teensy IDEs don't know about these pins so must use FASTIO + #if AVR_AT90USB1286_FAMILY //Teensy IDEs don't know about these pins so must use FASTIO if (pin == 46 || pin == 47) { if (pin == 46) { print_input_or_output(GET_OUTPUT(46)); @@ -539,7 +539,7 @@ inline void report_pin_state_extended(int8_t pin, bool ignore, bool extended = f SERIAL_ECHO_SP(8); // add padding if not an analog pin SERIAL_ECHOPGM(""); if (extended) { - #ifdef AVR_AT90USB1286_FAMILY //Teensy IDEs don't know about these pins so must use FASTIO + #if AVR_AT90USB1286_FAMILY //Teensy IDEs don't know about these pins so must use FASTIO if (pin == 46 || pin == 47) { SERIAL_PROTOCOL_SP(12); if (pin == 46) {