Browse Source

Power signal control definitions for ATX and others

pull/1/head
Nicolas Rossi 12 years ago
parent
commit
f3c1fc70a9
  1. 4
      Marlin/Configuration.h
  2. 17
      Marlin/Configuration_adv.h
  3. 4
      Marlin/Marlin_main.cpp

4
Marlin/Configuration.h

@ -49,7 +49,11 @@
#define MOTHERBOARD 7 #define MOTHERBOARD 7
#endif #endif
//// The following define selects which power supply you have. Please choose the one that matches your setup
// 1 = ATX
// 2 = X-Box 360 203Watts (the blue wire connected to PS_ON and the red wire to VCC)
#define POWER_SUPPLY 1
//=========================================================================== //===========================================================================
//=============================Thermal Settings ============================ //=============================Thermal Settings ============================

17
Marlin/Configuration_adv.h

@ -241,6 +241,23 @@ const unsigned int dropsegments=5; //everything with less than this number of st
#ifdef ULTIPANEL #ifdef ULTIPANEL
#undef SDCARDDETECTINVERTED #undef SDCARDDETECTINVERTED
#endif #endif
// Power Signal Control Definitions
// By default use ATX definition
#ifndef POWER_SUPPLY
#define POWER_SUPPLY 1
#endif
// 1 = ATX
#if (POWER_SUPPLY == 1)
#define PS_ON_AWAKE LOW
#define PS_ON_ASLEEP HIGH
#endif
// 2 = X-Box 360 203W
#if (POWER_SUPPLY == 2)
#define PS_ON_AWAKE HIGH
#define PS_ON_ASLEEP LOW
#endif
//=========================================================================== //===========================================================================
//=============================Buffers ============================ //=============================Buffers ============================
//=========================================================================== //===========================================================================

4
Marlin/Marlin_main.cpp

@ -1136,7 +1136,7 @@ void process_commands()
#if (PS_ON_PIN > -1) #if (PS_ON_PIN > -1)
case 80: // M80 - ATX Power On case 80: // M80 - ATX Power On
SET_OUTPUT(PS_ON_PIN); //GND SET_OUTPUT(PS_ON_PIN); //GND
WRITE(PS_ON_PIN, LOW); WRITE(PS_ON_PIN, PS_ON_AWAKE);
break; break;
#endif #endif
@ -1147,7 +1147,7 @@ void process_commands()
suicide(); suicide();
#elif (PS_ON_PIN > -1) #elif (PS_ON_PIN > -1)
SET_OUTPUT(PS_ON_PIN); SET_OUTPUT(PS_ON_PIN);
WRITE(PS_ON_PIN, HIGH); WRITE(PS_ON_PIN, PS_ON_ASLEEP);
#endif #endif
break; break;

Loading…
Cancel
Save