瀏覽代碼

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.
Ben Lye 7 年之前
父節點
當前提交
31514f453a
共有 2 個檔案被更改,包括 3 行新增3 行删除
  1. 1
    1
      Marlin/Marlin_main.cpp
  2. 2
    2
      Marlin/pinsDebug.h

+ 1
- 1
Marlin/Marlin_main.cpp 查看文件

@@ -6438,7 +6438,7 @@ inline void gcode_M42() {
6438 6438
       }
6439 6439
       else {
6440 6440
         report_pin_state_extended(pin, I_flag, true, "Pulsing   ");
6441
-        #ifdef AVR_AT90USB1286_FAMILY // Teensy IDEs don't know about these pins so must use FASTIO
6441
+        #if AVR_AT90USB1286_FAMILY // Teensy IDEs don't know about these pins so must use FASTIO
6442 6442
           if (pin == 46) {
6443 6443
             SET_OUTPUT(46);
6444 6444
             for (int16_t j = 0; j < repeat; j++) {

+ 2
- 2
Marlin/pinsDebug.h 查看文件

@@ -484,7 +484,7 @@ inline void report_pin_state_extended(int8_t pin, bool ignore, bool extended = f
484 484
         if (pin_is_protected(pin) && !ignore)
485 485
           SERIAL_ECHOPGM("protected ");
486 486
         else {
487
-          #ifdef AVR_AT90USB1286_FAMILY //Teensy IDEs don't know about these pins so must use FASTIO
487
+          #if AVR_AT90USB1286_FAMILY //Teensy IDEs don't know about these pins so must use FASTIO
488 488
             if (pin == 46 || pin == 47) {
489 489
               if (pin == 46) {
490 490
                 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
539 539
       SERIAL_ECHO_SP(8);   // add padding if not an analog pin
540 540
     SERIAL_ECHOPGM("<unused/unknown>");
541 541
     if (extended) {
542
-      #ifdef AVR_AT90USB1286_FAMILY  //Teensy IDEs don't know about these pins so must use FASTIO
542
+      #if AVR_AT90USB1286_FAMILY  //Teensy IDEs don't know about these pins so must use FASTIO
543 543
         if (pin == 46 || pin == 47) {
544 544
           SERIAL_PROTOCOL_SP(12);
545 545
           if (pin == 46) {

Loading…
取消
儲存