Merge remote-tracking branch 'upstream/edge' into fix/trapezoid-symmetry
[clinton/Smoothieware.git] / src / main.cpp
index 56cce1f..e165be4 100644 (file)
@@ -83,6 +83,15 @@ GPIO leds[5] = {
     GPIO(P4_28)
 };
 
+// debug pins, only used if defined in src/makefile
+#ifdef BLOCK_DEBUG_PIN
+GPIO block_debug_pin(BLOCK_DEBUG_PIN);
+#endif
+
+#ifdef STEPTICKER_DEBUG_PIN
+GPIO stepticker_debug_pin(STEPTICKER_DEBUG_PIN);
+#endif
+
 void init() {
 
     // Default pins to low status
@@ -91,6 +100,15 @@ void init() {
         leds[i]= 0;
     }
 
+#ifdef BLOCK_DEBUG_PIN
+    block_debug_pin.output();
+    block_debug_pin= 0;
+#endif
+#ifdef STEPTICKER_DEBUG_PIN
+    stepticker_debug_pin.output();
+    stepticker_debug_pin= 0;
+#endif
+
     Kernel* kernel = new Kernel();
 
     kernel->streams->printf("Smoothie Running @%ldMHz\r\n", SystemCoreClock / 1000000);