🔧 Optional FAN_INVERTING
This commit is contained in:
parent
401ba6613b
commit
c18294d83c
|
@ -2728,10 +2728,6 @@
|
||||||
#define HAS_FAN 1
|
#define HAS_FAN 1
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifndef FAN_INVERTING
|
|
||||||
#define FAN_INVERTING false
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#if PIN_EXISTS(FANMUX0)
|
#if PIN_EXISTS(FANMUX0)
|
||||||
#define HAS_FANMUX 1 // Part Cooling fan multipliexer
|
#define HAS_FANMUX 1 // Part Cooling fan multipliexer
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -370,9 +370,9 @@ PGMSTR(str_t_heating_failed, STR_T_HEATING_FAILED);
|
||||||
|
|
||||||
// Init fans according to whether they're native PWM or Software PWM
|
// Init fans according to whether they're native PWM or Software PWM
|
||||||
#ifdef BOARD_OPENDRAIN_MOSFETS
|
#ifdef BOARD_OPENDRAIN_MOSFETS
|
||||||
#define _INIT_SOFT_FAN(P) OUT_WRITE_OD(P, FAN_INVERTING ? LOW : HIGH)
|
#define _INIT_SOFT_FAN(P) OUT_WRITE_OD(P, ENABLED(FAN_INVERTING) ? LOW : HIGH)
|
||||||
#else
|
#else
|
||||||
#define _INIT_SOFT_FAN(P) OUT_WRITE(P, FAN_INVERTING ? LOW : HIGH)
|
#define _INIT_SOFT_FAN(P) OUT_WRITE(P, ENABLED(FAN_INVERTING) ? LOW : HIGH)
|
||||||
#endif
|
#endif
|
||||||
#if ENABLED(FAN_SOFT_PWM)
|
#if ENABLED(FAN_SOFT_PWM)
|
||||||
#define _INIT_FAN_PIN(P) _INIT_SOFT_FAN(P)
|
#define _INIT_FAN_PIN(P) _INIT_SOFT_FAN(P)
|
||||||
|
@ -3819,7 +3819,7 @@ void Temperature::isr() {
|
||||||
static SoftPWM soft_pwm_controller;
|
static SoftPWM soft_pwm_controller;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#define WRITE_FAN(n, v) WRITE(FAN##n##_PIN, (v) ^ FAN_INVERTING)
|
#define WRITE_FAN(n, v) WRITE(FAN##n##_PIN, (v) ^ ENABLED(FAN_INVERTING))
|
||||||
|
|
||||||
#if DISABLED(SLOW_PWM_HEATERS)
|
#if DISABLED(SLOW_PWM_HEATERS)
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue