|
@@ -42,15 +42,6 @@ void idle(
|
42
|
42
|
|
43
|
43
|
void manage_inactivity(bool ignore_stepper_queue = false);
|
44
|
44
|
|
45
|
|
-// Auto Power Control
|
46
|
|
-#if ENABLED(AUTO_POWER_CONTROL)
|
47
|
|
- #define PSU_ON() powerManager.power_on()
|
48
|
|
- #define PSU_OFF() powerManager.power_off()
|
49
|
|
-#else
|
50
|
|
- #define PSU_ON() OUT_WRITE(PS_ON_PIN, PS_ON_AWAKE)
|
51
|
|
- #define PSU_OFF() OUT_WRITE(PS_ON_PIN, PS_ON_ASLEEP)
|
52
|
|
-#endif
|
53
|
|
-
|
54
|
45
|
#if HAS_X2_ENABLE
|
55
|
46
|
#define enable_X() do{ X_ENABLE_WRITE( X_ENABLE_ON); X2_ENABLE_WRITE( X_ENABLE_ON); }while(0)
|
56
|
47
|
#define disable_X() do{ X_ENABLE_WRITE(!X_ENABLE_ON); X2_ENABLE_WRITE(!X_ENABLE_ON); axis_known_position[X_AXIS] = false; }while(0)
|
|
@@ -220,6 +211,19 @@ extern millis_t max_inactive_time, stepper_inactive_time;
|
220
|
211
|
extern int lpq_len;
|
221
|
212
|
#endif
|
222
|
213
|
|
|
214
|
+#if HAS_POWER_SWITCH
|
|
215
|
+ extern bool powersupply_on;
|
|
216
|
+ #define PSU_PIN_ON() do{ OUT_WRITE(PS_ON_PIN, PS_ON_AWAKE); powersupply_on = true; }while(0)
|
|
217
|
+ #define PSU_PIN_OFF() do{ OUT_WRITE(PS_ON_PIN, PS_ON_ASLEEP); powersupply_on = false; }while(0)
|
|
218
|
+ #if ENABLED(AUTO_POWER_CONTROL)
|
|
219
|
+ #define PSU_ON() powerManager.power_on()
|
|
220
|
+ #define PSU_OFF() powerManager.power_off()
|
|
221
|
+ #else
|
|
222
|
+ #define PSU_ON() PSU_PIN_ON()
|
|
223
|
+ #define PSU_OFF() PSU_PIN_OFF()
|
|
224
|
+ #endif
|
|
225
|
+#endif
|
|
226
|
+
|
223
|
227
|
bool pin_is_protected(const pin_t pin);
|
224
|
228
|
|
225
|
229
|
#if HAS_SUICIDE
|