Browse Source

D6: also hide declaration behind conditional

Yuri D'Elia 3 years ago
parent
commit
ed9f52dd85
2 changed files with 4 additions and 1 deletions
  1. 1 1
      Firmware/Dcodes.cpp
  2. 3 0
      Firmware/Dcodes.h

+ 1 - 1
Firmware/Dcodes.cpp

@@ -405,7 +405,7 @@ void dcode_5()
 }
 #endif //DEBUG_DCODE5
 
-#if defined DEBUG_DCODE6 || defined DEBUG_DCODES
+#if defined(XFLASH) && (defined DEBUG_DCODE6 || defined DEBUG_DCODES)
     /*!
     ### D6 - Read/Write external FLASH <a href="https://reprap.org/wiki/G-code#D6:_Read.2FWrite_external_FLASH">D6: Read/Write external Flash</a>
     Reserved

+ 3 - 0
Firmware/Dcodes.h

@@ -19,7 +19,10 @@ extern void dcode_4(); //D4 - Read/Write PIN
 extern void dcode_5(); //D5 - Read/Write FLASH
 #endif //DEBUG_DCODE5
 
+#if defined DEBUG_DCODE6 || defined DEBUG_DCODES
 extern void dcode_6(); //D6 - Read/Write external FLASH
+#endif
+
 extern void dcode_7(); //D7 - Read/Write Bootloader
 extern void dcode_8(); //D8 - Read/Write PINDA
 extern void dcode_9(); //D9 - Read/Write ADC (Write=enable simulated, Read=disable simulated)