Browse Source

Power signal control definitions for ATX and others

Nicolas Rossi 12 years ago
parent
commit
f3c1fc70a9
3 changed files with 23 additions and 2 deletions
  1. 4
    0
      Marlin/Configuration.h
  2. 17
    0
      Marlin/Configuration_adv.h
  3. 2
    2
      Marlin/Marlin_main.cpp

+ 4
- 0
Marlin/Configuration.h View File

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 View File

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

+ 2
- 2
Marlin/Marlin_main.cpp View File

1136
     #if (PS_ON_PIN > -1)
1136
     #if (PS_ON_PIN > -1)
1137
       case 80: // M80 - ATX Power On
1137
       case 80: // M80 - ATX Power On
1138
         SET_OUTPUT(PS_ON_PIN); //GND
1138
         SET_OUTPUT(PS_ON_PIN); //GND
1139
-        WRITE(PS_ON_PIN, LOW);
1139
+        WRITE(PS_ON_PIN, PS_ON_AWAKE);
1140
         break;
1140
         break;
1141
       #endif
1141
       #endif
1142
       
1142
       
1147
         suicide();
1147
         suicide();
1148
       #elif (PS_ON_PIN > -1)
1148
       #elif (PS_ON_PIN > -1)
1149
         SET_OUTPUT(PS_ON_PIN); 
1149
         SET_OUTPUT(PS_ON_PIN); 
1150
-        WRITE(PS_ON_PIN, HIGH);
1150
+        WRITE(PS_ON_PIN, PS_ON_ASLEEP);
1151
       #endif
1151
       #endif
1152
 		break;
1152
 		break;
1153
         
1153
         

Loading…
Cancel
Save