Skip to content

Commit d0fbc94

Browse files
committed
♻️ FAN_PIN => FAN0_PIN
1 parent 5e8c7b3 commit d0fbc94

File tree

224 files changed

+372
-373
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

224 files changed

+372
-373
lines changed

Marlin/src/HAL/AVR/inc/SanityCheck.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -73,8 +73,8 @@
7373
/**
7474
* Checks for SOFT PWM
7575
*/
76-
#if HAS_FAN0 && FAN_PIN == 9 && DISABLED(FAN_SOFT_PWM) && ENABLED(SPEAKER)
77-
#error "FAN_PIN 9 Hardware PWM uses Timer 2 which conflicts with Arduino AVR Tone Timer (for SPEAKER)."
76+
#if HAS_FAN0 && FAN0_PIN == 9 && DISABLED(FAN_SOFT_PWM) && ENABLED(SPEAKER)
77+
#error "FAN0_PIN 9 Hardware PWM uses Timer 2 which conflicts with Arduino AVR Tone Timer (for SPEAKER)."
7878
#error "Disable SPEAKER or enable FAN_SOFT_PWM."
7979
#endif
8080

Marlin/src/HAL/STM32/inc/SanityCheck.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@
5555
* Check for common serial pin conflicts
5656
*/
5757
#define _CHECK_SERIAL_PIN(N) (( \
58-
BTN_EN1 == N || DOGLCD_CS == N || HEATER_BED_PIN == N || FAN_PIN == N || \
58+
BTN_EN1 == N || DOGLCD_CS == N || HEATER_BED_PIN == N || FAN0_PIN == N || \
5959
SDIO_D2_PIN == N || SDIO_D3_PIN == N || SDIO_CK_PIN == N || SDIO_CMD_PIN == N \
6060
))
6161
#define CHECK_SERIAL_PIN(T,N) defined(UART##N##_##T##_PIN) && _CHECK_SERIAL_PIN(UART##N##_##T##_PIN)

Marlin/src/HAL/STM32F1/timers.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ typedef uint16_t hal_timer_t;
8181
#endif
8282

8383
#if MB(BTT_SKR_MINI_E3_V1_0, BTT_SKR_E3_DIP, BTT_SKR_MINI_E3_V1_2, MKS_ROBIN_LITE, MKS_ROBIN_E3D, MKS_ROBIN_E3)
84-
// SKR Mini E3 boards use PA8 as FAN_PIN, so TIMER 1 is used for Fan PWM.
84+
// SKR Mini E3 boards use PA8 as FAN0_PIN, so TIMER 1 is used for Fan PWM.
8585
#ifdef STM32_HIGH_DENSITY
8686
#define MF_TIMER_SERVO0 8 // tone.cpp uses Timer 4
8787
#else

Marlin/src/inc/Conditionals_post.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2685,7 +2685,7 @@
26852685
&& _NOT_E_AUTO(6,F) \
26862686
&& _NOT_E_AUTO(7,F) \
26872687
&& F < MAX_FANS)
2688-
#if PIN_EXISTS(FAN)
2688+
#if PIN_EXISTS(FAN0)
26892689
#define HAS_FAN0 1
26902690
#endif
26912691
#if _HAS_FAN(1)

Marlin/src/inc/SanityCheck.h

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -2286,21 +2286,21 @@ static_assert(X_MAX_LENGTH >= X_BED_SIZE, "Movement bounds (X_MIN_POS, X_MAX_POS
22862286
*/
22872287
#if HAS_AUTO_FAN
22882288
#if HAS_FAN0
2289-
#if PIN_EXISTS(E0_AUTO_FAN) && E0_AUTO_FAN_PIN == FAN_PIN
2290-
#error "You cannot set E0_AUTO_FAN_PIN equal to FAN_PIN."
2291-
#elif PIN_EXISTS(E1_AUTO_FAN) && E1_AUTO_FAN_PIN == FAN_PIN
2292-
#error "You cannot set E1_AUTO_FAN_PIN equal to FAN_PIN."
2293-
#elif PIN_EXISTS(E2_AUTO_FAN) && E2_AUTO_FAN_PIN == FAN_PIN
2294-
#error "You cannot set E2_AUTO_FAN_PIN equal to FAN_PIN."
2295-
#elif PIN_EXISTS(E3_AUTO_FAN) && E3_AUTO_FAN_PIN == FAN_PIN
2296-
#error "You cannot set E3_AUTO_FAN_PIN equal to FAN_PIN."
2289+
#if PIN_EXISTS(E0_AUTO_FAN) && E0_AUTO_FAN_PIN == FAN0_PIN
2290+
#error "You cannot set E0_AUTO_FAN_PIN equal to FAN0_PIN."
2291+
#elif PIN_EXISTS(E1_AUTO_FAN) && E1_AUTO_FAN_PIN == FAN0_PIN
2292+
#error "You cannot set E1_AUTO_FAN_PIN equal to FAN0_PIN."
2293+
#elif PIN_EXISTS(E2_AUTO_FAN) && E2_AUTO_FAN_PIN == FAN0_PIN
2294+
#error "You cannot set E2_AUTO_FAN_PIN equal to FAN0_PIN."
2295+
#elif PIN_EXISTS(E3_AUTO_FAN) && E3_AUTO_FAN_PIN == FAN0_PIN
2296+
#error "You cannot set E3_AUTO_FAN_PIN equal to FAN0_PIN."
22972297
#endif
22982298
#endif
22992299
#endif
23002300

23012301
#if HAS_FAN0
2302-
#if CONTROLLER_FAN_PIN == FAN_PIN
2303-
#error "You cannot set CONTROLLER_FAN_PIN equal to FAN_PIN."
2302+
#if CONTROLLER_FAN_PIN == FAN0_PIN
2303+
#error "You cannot set CONTROLLER_FAN_PIN equal to FAN0_PIN."
23042304
#elif ENABLED(FAN_SOFT_PWM_REQUIRED) && DISABLED(FAN_SOFT_PWM)
23052305
#error "FAN_SOFT_PWM is required for your board. Enable it to continue."
23062306
#endif
@@ -2342,8 +2342,8 @@ static_assert(X_MAX_LENGTH >= X_BED_SIZE, "Movement bounds (X_MIN_POS, X_MAX_POS
23422342
#if NEED_CASE_LIGHT_PIN
23432343
#if !PIN_EXISTS(CASE_LIGHT)
23442344
#error "CASE_LIGHT_ENABLE requires CASE_LIGHT_PIN, CASE_LIGHT_USE_NEOPIXEL, or CASE_LIGHT_USE_RGB_LED."
2345-
#elif CASE_LIGHT_PIN == FAN_PIN
2346-
#error "CASE_LIGHT_PIN conflicts with FAN_PIN. Resolve before continuing."
2345+
#elif CASE_LIGHT_PIN == FAN0_PIN
2346+
#error "CASE_LIGHT_PIN conflicts with FAN0_PIN. Resolve before continuing."
23472347
#endif
23482348
#endif
23492349

@@ -4100,8 +4100,8 @@ static_assert(_PLUS_TEST(4), "HOMING_FEEDRATE_MM_M values must be positive.");
41004100
#error "SPINDLE_LASER_PWM_PIN conflicts with E6_AUTO_FAN_PIN."
41014101
#elif _PIN_CONFLICT(E7_AUTO_FAN)
41024102
#error "SPINDLE_LASER_PWM_PIN conflicts with E7_AUTO_FAN_PIN."
4103-
#elif _PIN_CONFLICT(FAN)
4104-
#error "SPINDLE_LASER_PWM_PIN conflicts with FAN_PIN."
4103+
#elif _PIN_CONFLICT(FAN0)
4104+
#error "SPINDLE_LASER_PWM_PIN conflicts with FAN0_PIN."
41054105
#elif _PIN_CONFLICT(FAN1)
41064106
#error "SPINDLE_LASER_PWM_PIN conflicts with FAN1_PIN."
41074107
#elif _PIN_CONFLICT(FAN2)

Marlin/src/module/temperature.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2642,7 +2642,7 @@ void Temperature::init() {
26422642
#endif
26432643

26442644
#if HAS_FAN0
2645-
INIT_FAN_PIN(FAN_PIN);
2645+
INIT_FAN_PIN(FAN0_PIN);
26462646
#endif
26472647
#if HAS_FAN1
26482648
INIT_FAN_PIN(FAN1_PIN);

Marlin/src/pins/esp32/pins_E4D.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@
9090
// Heaters / Fans
9191
//
9292
#define HEATER_0_PIN 2
93-
#define FAN_PIN 0
93+
#define FAN0_PIN 0
9494
#define HEATER_BED_PIN 15
9595

9696
//

Marlin/src/pins/esp32/pins_ENWI_ESPNP.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,7 @@
101101

102102
// General use mosfets, useful for things like pumps and solenoids
103103
// Shift register pins 128, 129, 130 and 131 are broken out and can be used
104-
#define FAN_PIN 132
104+
#define FAN0_PIN 132
105105
#define FAN1_PIN 134
106106
#define FAN2_PIN 135
107107
#define FAN3_PIN 136

Marlin/src/pins/esp32/pins_ESP32.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@
7979
// Heaters / Fans
8080
//
8181
#define HEATER_0_PIN 2
82-
#define FAN_PIN 13
82+
#define FAN0_PIN 13
8383
#define HEATER_BED_PIN 4
8484

8585
// SPI

Marlin/src/pins/esp32/pins_ESPA_common.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@
6868
// Heaters / Fans
6969
//
7070
#define HEATER_0_PIN 2
71-
#define FAN_PIN 13
71+
#define FAN0_PIN 13
7272
#define HEATER_BED_PIN 4
7373

7474
//

0 commit comments

Comments
 (0)