Переглянути джерело

Merge pull request #360 from njprossi/Marlin_v1

Power signal control definitions for other power supplies
daid 12 роки тому
джерело
коміт
27843388c6
3 змінених файлів з 27 додано та 2 видалено
  1. 4
    0
      Marlin/Configuration.h
  2. 17
    0
      Marlin/Configuration_adv.h
  3. 6
    2
      Marlin/Marlin_main.cpp

+ 4
- 0
Marlin/Configuration.h Переглянути файл

49
 #define MOTHERBOARD 7
49
 #define MOTHERBOARD 7
50
 #endif
50
 #endif
51
 
51
 
52
+//// The following define selects which power supply you have. Please choose the one that matches your setup
53
+// 1 = ATX
54
+// 2 = X-Box 360 203Watts (the blue wire connected to PS_ON and the red wire to VCC)
52
 
55
 
56
+#define POWER_SUPPLY 1
53
 
57
 
54
 //===========================================================================
58
 //===========================================================================
55
 //=============================Thermal Settings  ============================
59
 //=============================Thermal Settings  ============================

+ 17
- 0
Marlin/Configuration_adv.h Переглянути файл

243
 #ifdef ULTIPANEL
243
 #ifdef ULTIPANEL
244
  #undef SDCARDDETECTINVERTED
244
  #undef SDCARDDETECTINVERTED
245
 #endif
245
 #endif
246
+
247
+// Power Signal Control Definitions
248
+// By default use ATX definition
249
+#ifndef POWER_SUPPLY
250
+  #define POWER_SUPPLY 1
251
+#endif
252
+// 1 = ATX
253
+#if (POWER_SUPPLY == 1) 
254
+  #define PS_ON_AWAKE  LOW
255
+  #define PS_ON_ASLEEP HIGH
256
+#endif
257
+// 2 = X-Box 360 203W
258
+#if (POWER_SUPPLY == 2) 
259
+  #define PS_ON_AWAKE  HIGH
260
+  #define PS_ON_ASLEEP LOW
261
+#endif
262
+
246
 //===========================================================================
263
 //===========================================================================
247
 //=============================Buffers           ============================
264
 //=============================Buffers           ============================
248
 //===========================================================================
265
 //===========================================================================

+ 6
- 2
Marlin/Marlin_main.cpp Переглянути файл

295
       WRITE(SUICIDE_PIN, HIGH);
295
       WRITE(SUICIDE_PIN, HIGH);
296
    #endif
296
    #endif
297
  #endif
297
  #endif
298
+ #if (PS_ON_PIN > -1)
299
+   SET_OUTPUT(PS_ON_PIN);
300
+   WRITE(PS_ON_PIN, PS_ON_AWAKE);
301
+ #endif
298
 }
302
 }
299
 
303
 
300
 void suicide()
304
 void suicide()
1137
     #if (PS_ON_PIN > -1)
1141
     #if (PS_ON_PIN > -1)
1138
       case 80: // M80 - ATX Power On
1142
       case 80: // M80 - ATX Power On
1139
         SET_OUTPUT(PS_ON_PIN); //GND
1143
         SET_OUTPUT(PS_ON_PIN); //GND
1140
-        WRITE(PS_ON_PIN, LOW);
1144
+        WRITE(PS_ON_PIN, PS_ON_AWAKE);
1141
         break;
1145
         break;
1142
       #endif
1146
       #endif
1143
       
1147
       
1148
         suicide();
1152
         suicide();
1149
       #elif (PS_ON_PIN > -1)
1153
       #elif (PS_ON_PIN > -1)
1150
         SET_OUTPUT(PS_ON_PIN); 
1154
         SET_OUTPUT(PS_ON_PIN); 
1151
-        WRITE(PS_ON_PIN, HIGH);
1155
+        WRITE(PS_ON_PIN, PS_ON_ASLEEP);
1152
       #endif
1156
       #endif
1153
 		break;
1157
 		break;
1154
         
1158
         

Завантаження…
Відмінити
Зберегти