Prusa MINI Firmware overview
power.h
Go to the documentation of this file.
1 /**
2  * Marlin 3D Printer Firmware
3  * Copyright (c) 2019 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
4  *
5  * Based on Sprinter and grbl.
6  * Copyright (c) 2011 Camiel Gubbels / Erik van der Zalm
7  *
8  * This program is free software: you can redistribute it and/or modify
9  * it under the terms of the GNU General Public License as published by
10  * the Free Software Foundation, either version 3 of the License, or
11  * (at your option) any later version.
12  *
13  * This program is distributed in the hope that it will be useful,
14  * but WITHOUT ANY WARRANTY; without even the implied warranty of
15  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16  * GNU General Public License for more details.
17  *
18  * You should have received a copy of the GNU General Public License
19  * along with this program. If not, see <http://www.gnu.org/licenses/>.
20  *
21  */
22 #pragma once
23 
24 /**
25  * power.h - power control
26  */
27 
28 #include "../core/millis_t.h"
29 
30 class Power {
31  public:
32  static void check();
33  static void power_on();
34  static void power_off();
35  private:
36  static millis_t lastPowerOn;
37  static bool is_power_needed();
38 };
39 
40 extern Power powerManager;
Y_ENABLE_ON
#define Y_ENABLE_ON
Definition: Configuration_A3ides_2209_MINI.h:927
E1_ENABLE_READ
#define E1_ENABLE_READ()
Definition: indirection.h:204
HAS_X2_ENABLE
#define HAS_X2_ENABLE
Definition: Conditionals_post.h:893
E2_ENABLE_READ
#define E2_ENABLE_READ()
Definition: indirection.h:221
Z_ENABLE_READ
#define Z_ENABLE_READ()
Definition: indirection.h:88
HAS_Y2_ENABLE
#define HAS_Y2_ENABLE
Definition: Conditionals_post.h:903
E_ENABLE_ON
#define E_ENABLE_ON
Definition: Configuration_A3ides_2209_MINI.h:929
HAS_HEATED_BED
#define HAS_HEATED_BED
Definition: Conditionals_post.h:1044
power.h
i
uint8_t i
Definition: screen_test_graph.c:72
X2_ENABLE_READ
#define X2_ENABLE_READ()
Definition: indirection.h:106
millis
uint32_t millis(void)
Definition: wiring_time.c:29
X_ENABLE_ON
#define X_ENABLE_ON
Definition: Configuration_A3ides_2209_MINI.h:926
E4_ENABLE_READ
#define E4_ENABLE_READ()
Definition: indirection.h:255
Power::check
static void check()
E3_ENABLE_READ
#define E3_ENABLE_READ()
Definition: indirection.h:238
powerManager
Power powerManager
if
if(size<=((png_alloc_size_t) -1) - ob)
Definition: pngwrite.c:2176
HOTEND_LOOP
#define HOTEND_LOOP()
Definition: Conditionals_LCD.h:436
ELAPSED
#define ELAPSED(NOW, SOON)
Definition: millis_t.h:29
X_ENABLE_READ
#define X_ENABLE_READ()
Definition: indirection.h:54
E_STEPPERS
#define E_STEPPERS
Definition: Conditionals_LCD.h:429
restore_stepper_drivers
void restore_stepper_drivers()
Definition: indirection.cpp:35
delay
void delay(uint32_t ms)
Definition: wiring_time.c:42
Y_ENABLE_READ
#define Y_ENABLE_READ()
Definition: indirection.h:71
Power
Definition: power.h:30
Z2_ENABLE_READ
#define Z2_ENABLE_READ()
Definition: indirection.h:146
E0_ENABLE_READ
#define E0_ENABLE_READ()
Definition: indirection.h:187
Z_ENABLE_ON
#define Z_ENABLE_ON
Definition: Configuration_A3ides_2209_MINI.h:928
E5_ENABLE_READ
#define E5_ENABLE_READ()
Definition: indirection.h:272
HAS_Z2_ENABLE
#define HAS_Z2_ENABLE
Definition: Conditionals_post.h:913
thermalManager
Temperature thermalManager
Definition: temperature.cpp:89
millis_t
uint32_t millis_t
Definition: millis_t.h:26
Power::power_on
static void power_on()
Power::power_off
static void power_off()
Y2_ENABLE_READ
#define Y2_ENABLE_READ()
Definition: indirection.h:125