ソースを参照

Power signal control definitions for ATX and others

Nicolas Rossi 12年前
コミット
f3c1fc70a9
3個のファイルの変更23行の追加2行の削除
  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 ファイルの表示

@@ -49,7 +49,11 @@
49 49
 #define MOTHERBOARD 7
50 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 59
 //=============================Thermal Settings  ============================

+ 17
- 0
Marlin/Configuration_adv.h ファイルの表示

@@ -241,6 +241,23 @@ const unsigned int dropsegments=5; //everything with less than this number of st
241 241
 #ifdef ULTIPANEL
242 242
  #undef SDCARDDETECTINVERTED
243 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 262
 //=============================Buffers           ============================
246 263
 //===========================================================================

+ 2
- 2
Marlin/Marlin_main.cpp ファイルの表示

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

読み込み中…
キャンセル
保存