Prusa3d Marlin fork
fancheck.h
1 // fan control and check
2 #pragma once
3 
4 #include "Configuration.h"
5 #include "config.h"
6 
7 #if (defined(FANCHECK) && defined(TACH_0) && (TACH_0 > -1))
8 enum {
9  EFCE_OK = 0,
10  EFCE_FIXED,
11  EFCE_REPORTED
12 };
13 extern volatile uint8_t fan_check_error;
14 
15 void readFanTach();
16 #endif //(defined(TACH_0))
17 
18 #if (defined(FANCHECK) && defined(TACH_1) && (TACH_1 >-1))
19 void setup_fan_interrupt();
20 #endif // (defined(FANCHECK) && defined(TACH_1) && (TACH_1 >-1))
21 
22 #ifdef EXTRUDER_ALTFAN_DETECT
23 extern bool extruder_altfan_detect();
24 extern void altfanOverride_toggle();
25 extern bool altfanOverride_get();
26 #endif //EXTRUDER_ALTFAN_DETECT
27 
28 #if (defined(EXTRUDER_0_AUTO_FAN_PIN) && EXTRUDER_0_AUTO_FAN_PIN > -1)
29 #ifdef FAN_SOFT_PWM
30 extern bool fan_measuring;
31 #endif //FAN_SOFT_PWM
32 
33 extern unsigned long extruder_autofan_last_check;
34 void setExtruderAutoFanState(uint8_t state);
35 void checkExtruderAutoFans();
36 #endif
37 
38 void checkFans();
39 void resetFanCheck(); // resets the fan measuring state
40 
41 void hotendFanSetFullSpeed();
42 void hotendDefaultAutoFanState();