fancheck.h 918 B

1234567891011121314151617181920212223242526272829303132333435
  1. // fan control and check
  2. #pragma once
  3. #include "Configuration.h"
  4. #include "config.h"
  5. #if (defined(FANCHECK) && defined(TACH_0) && (TACH_0 > -1))
  6. enum {
  7. EFCE_OK = 0, //!< normal operation, both fans are ok
  8. EFCE_FIXED, //!< previous fan error was fixed
  9. EFCE_REPORTED //!< fan error detected and reported to LCD and serial
  10. };
  11. extern volatile uint8_t fan_check_error;
  12. void readFanTach();
  13. #endif //(defined(TACH_0))
  14. #ifdef EXTRUDER_ALTFAN_DETECT
  15. extern bool extruder_altfan_detect();
  16. extern void altfanOverride_toggle();
  17. extern bool altfanOverride_get();
  18. #endif //EXTRUDER_ALTFAN_DETECT
  19. #if (defined(EXTRUDER_0_AUTO_FAN_PIN) && EXTRUDER_0_AUTO_FAN_PIN > -1)
  20. #ifdef FAN_SOFT_PWM
  21. extern bool fan_measuring;
  22. #endif //FAN_SOFT_PWM
  23. extern unsigned long extruder_autofan_last_check;
  24. void setExtruderAutoFanState(uint8_t state);
  25. void checkExtruderAutoFans();
  26. #endif
  27. void checkFans();
  28. void hotendFanSetFullSpeed();