Sfoglia il codice sorgente

Init DAC_DISABLE_PIN in dac_init

Scott Lahteine 9 anni fa
parent
commit
ddb386c139
1 ha cambiato i file con 5 aggiunte e 0 eliminazioni
  1. 5
    0
      Marlin/stepper_dac.cpp

+ 5
- 0
Marlin/stepper_dac.cpp Vedi File

@@ -51,6 +51,11 @@
51 51
   const uint8_t dac_order[NUM_AXIS] = DAC_STEPPER_ORDER;
52 52
 
53 53
   int dac_init() {
54
+    #if PIN_EXISTS(DAC_DISABLE)
55
+      pinMode(DAC_DISABLE_PIN, OUTPUT);
56
+      digitalWrite(DAC_DISABLE_PIN, LOW);  // set pin low to enable DAC
57
+    #endif
58
+
54 59
     mcp4728_init();
55 60
 
56 61
     if (mcp4728_simpleCommand(RESET)) return -1;

Loading…
Annulla
Salva