Skip to content

Commit fa0b86f

Browse files
committed
🔧 Move TFT sanity checks
1 parent f0f5cd4 commit fa0b86f

21 files changed

+63
-64
lines changed

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

-4
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,3 @@
2020
*
2121
*/
2222
#pragma once
23-
24-
#if HAS_SPI_TFT || HAS_FSMC_TFT
25-
#error "Sorry! TFT displays are not available for HAL/AVR."
26-
#endif

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

+4
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,10 @@
2525
* Test AVR-specific configuration values for errors at compile-time.
2626
*/
2727

28+
#if HAS_SPI_TFT || HAS_FSMC_TFT
29+
#error "Sorry! TFT displays are not available for HAL/AVR."
30+
#endif
31+
2832
/**
2933
* Check for common serial pin conflicts
3034
*/

Marlin/src/HAL/DUE/inc/Conditionals_LCD.h

-4
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,3 @@
2020
*
2121
*/
2222
#pragma once
23-
24-
#if HAS_SPI_TFT || HAS_FSMC_TFT
25-
#error "Sorry! TFT displays are not available for HAL/DUE."
26-
#endif

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

+5-1
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,10 @@
2525
* Test Arduino Due specific configuration values for errors at compile-time.
2626
*/
2727

28+
#if HAS_SPI_TFT || HAS_FSMC_TFT
29+
#error "Sorry! TFT displays are not available for HAL/DUE."
30+
#endif
31+
2832
/**
2933
* Check for common serial pin conflicts
3034
*/
@@ -77,7 +81,7 @@
7781
#endif
7882

7983
#if ENABLED(FAST_PWM_FAN) || SPINDLE_LASER_FREQUENCY
80-
#error "Features requiring Hardware PWM (FAST_PWM_FAN, SPINDLE_LASER_FREQUENCY) are not yet supported on DUE."
84+
#error "Features requiring Hardware PWM (FAST_PWM_FAN, SPINDLE_LASER_FREQUENCY) are not yet supported for HAL/DUE."
8185
#endif
8286

8387
#if HAS_TMC_SW_SERIAL

Marlin/src/HAL/ESP32/inc/Conditionals_LCD.h

-4
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,3 @@
2020
*
2121
*/
2222
#pragma once
23-
24-
#if HAS_SPI_TFT || HAS_FSMC_TFT
25-
#error "Sorry! TFT displays are not available for HAL/ESP32."
26-
#endif

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

+9-2
Original file line numberDiff line numberDiff line change
@@ -21,12 +21,19 @@
2121
*/
2222
#pragma once
2323

24+
#if HAS_SPI_TFT || HAS_FSMC_TFT
25+
#error "Sorry! TFT displays are not available for HAL/ESP32."
26+
#endif
27+
2428
#if ENABLED(EMERGENCY_PARSER)
2529
#error "EMERGENCY_PARSER is not yet implemented for ESP32. Disable EMERGENCY_PARSER to continue."
2630
#endif
2731

28-
#if (ENABLED(SPINDLE_LASER_USE_PWM) && SPINDLE_LASER_FREQUENCY > 78125) || (ENABLED(FAST_PWM_FAN_FREQUENCY) && FAST_PWM_FAN_FREQUENCY > 78125)
29-
#error "SPINDLE_LASER_FREQUENCY and FAST_PWM_FREQUENCY maximum value is 78125Hz for ESP32."
32+
#if ENABLED(SPINDLE_LASER_USE_PWM) && SPINDLE_LASER_FREQUENCY > 78125
33+
#error "SPINDLE_LASER_FREQUENCY maximum value is 78125Hz for ESP32."
34+
#endif
35+
#if ENABLED(FAST_PWM_FAN) && FAST_PWM_FAN_FREQUENCY > 78125
36+
#error "FAST_PWM_FREQUENCY maximum value is 78125Hz for ESP32."
3037
#endif
3138

3239
#if HAS_TMC_SW_SERIAL

Marlin/src/HAL/LINUX/inc/Conditionals_LCD.h

-4
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,3 @@
2020
*
2121
*/
2222
#pragma once
23-
24-
#if HAS_SPI_TFT || HAS_FSMC_TFT
25-
#error "Sorry! TFT displays are not available for HAL/LINUX."
26-
#endif

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

+7-3
Original file line numberDiff line numberDiff line change
@@ -31,13 +31,17 @@
3131
#endif
3232

3333
#if ENABLED(FAST_PWM_FAN) || SPINDLE_LASER_FREQUENCY
34-
#error "Features requiring Hardware PWM (FAST_PWM_FAN, SPINDLE_LASER_FREQUENCY) are not yet supported on LINUX."
34+
#error "Features requiring Hardware PWM (FAST_PWM_FAN, SPINDLE_LASER_FREQUENCY) are not yet supported for HAL/LINUX."
35+
#endif
36+
37+
#if HAS_SPI_TFT || HAS_FSMC_TFT
38+
#error "Sorry! TFT displays are not available for HAL/LINUX."
3539
#endif
3640

3741
#if HAS_TMC_SW_SERIAL
38-
#error "TMC220x Software Serial is not supported on LINUX."
42+
#error "TMC220x Software Serial is not supported for HAL/LINUX."
3943
#endif
4044

4145
#if ENABLED(POSTMORTEM_DEBUGGING)
42-
#error "POSTMORTEM_DEBUGGING is not yet supported on LINUX."
46+
#error "POSTMORTEM_DEBUGGING is not yet supported for HAL/LINUX."
4347
#endif

Marlin/src/HAL/LPC1768/inc/Conditionals_LCD.h

-4
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,3 @@
2020
*
2121
*/
2222
#pragma once
23-
24-
#if HAS_FSMC_TFT
25-
#error "Sorry! FSMC TFT displays are not current available for HAL/LPC1768."
26-
#endif

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

+4
Original file line numberDiff line numberDiff line change
@@ -77,6 +77,10 @@ static_assert(!(NUM_SERVOS && ENABLED(FAST_PWM_FAN)), "BLTOUCH and Servos are in
7777
#endif
7878
#endif
7979

80+
#if HAS_FSMC_TFT
81+
#error "Sorry! FSMC TFT displays are not current available for HAL/LPC1768."
82+
#endif
83+
8084
static_assert(DISABLED(BAUD_RATE_GCODE), "BAUD_RATE_GCODE is not yet supported on LPC176x.");
8185

8286
/**

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

+1-1
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@
3131
#endif
3232

3333
#if ENABLED(FAST_PWM_FAN) || SPINDLE_LASER_FREQUENCY
34-
#error "Features requiring Hardware PWM (FAST_PWM_FAN, SPINDLE_LASER_FREQUENCY) are not yet supported on LINUX."
34+
#error "Features requiring Hardware PWM (FAST_PWM_FAN, SPINDLE_LASER_FREQUENCY) are not yet supported for HAL/LINUX."
3535
#endif
3636

3737
#if HAS_TMC_SW_SERIAL

Marlin/src/HAL/SAMD21/inc/Conditionals_LCD.h

-8
Original file line numberDiff line numberDiff line change
@@ -20,12 +20,4 @@
2020
*
2121
*/
2222

23-
/**
24-
* SAMD21 HAL developed by Bart Meijer (brupje)
25-
* Based on SAMD51 HAL by Giuliano Zaro (AKA GMagician)
26-
*/
2723
#pragma once
28-
29-
#if HAS_SPI_TFT || HAS_FSMC_TFT
30-
#error "Sorry! TFT displays are not available for HAL/SAMD21."
31-
#endif

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

+5-1
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,10 @@
2929
* Test SAMD21 specific configuration values for errors at compile-time.
3030
*/
3131

32+
#if HAS_SPI_TFT || HAS_FSMC_TFT
33+
#error "Sorry! TFT displays are not available for HAL/SAMD21."
34+
#endif
35+
3236
#if SERVO_TC == MF_TIMER_RTC
3337
#error "Servos can't use RTC timer"
3438
#endif
@@ -42,7 +46,7 @@
4246
#endif
4347

4448
#if ENABLED(FAST_PWM_FAN)
45-
#error "Features requiring Hardware PWM (FAST_PWM_FAN) are not yet supported on SAMD21."
49+
#error "Features requiring Hardware PWM (FAST_PWM_FAN) are not yet supported for HAL/SAMD21."
4650
#endif
4751

4852
#if ENABLED(POSTMORTEM_DEBUGGING)

Marlin/src/HAL/SAMD51/inc/Conditionals_LCD.h

-4
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,3 @@
2020
*
2121
*/
2222
#pragma once
23-
24-
#if HAS_SPI_TFT || HAS_FSMC_TFT
25-
#error "Sorry! TFT displays are not available for HAL/SAMD51."
26-
#endif

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

+5-1
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,10 @@
2929
* Test SAMD51 specific configuration values for errors at compile-time.
3030
*/
3131

32+
#if HAS_SPI_TFT || HAS_FSMC_TFT
33+
#error "Sorry! TFT displays are not available for HAL/SAMD51."
34+
#endif
35+
3236
#if ENABLED(FLASH_EEPROM_EMULATION)
3337
#warning "Did you activate the SmartEEPROM? See https://github.com/GMagician/SAMD51-SmartEEprom-Manager/releases"
3438
#endif
@@ -55,7 +59,7 @@
5559
#endif
5660

5761
#if ENABLED(FAST_PWM_FAN) || SPINDLE_LASER_FREQUENCY
58-
#error "Features requiring Hardware PWM (FAST_PWM_FAN, SPINDLE_LASER_FREQUENCY) are not yet supported on SAMD51."
62+
#error "Features requiring Hardware PWM (FAST_PWM_FAN, SPINDLE_LASER_FREQUENCY) are not yet supported for HAL/SAMD51."
5963
#endif
6064

6165
#if ENABLED(POSTMORTEM_DEBUGGING)

Marlin/src/HAL/TEENSY31_32/inc/Conditionals_LCD.h

-4
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,3 @@
2020
*
2121
*/
2222
#pragma once
23-
24-
#if HAS_SPI_TFT || HAS_FSMC_TFT
25-
#error "Sorry! TFT displays are not available for HAL/TEENSY31_32."
26-
#endif

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

+8-4
Original file line numberDiff line numberDiff line change
@@ -25,22 +25,26 @@
2525
* Test TEENSY35_36 specific configuration values for errors at compile-time.
2626
*/
2727

28+
#if HAS_SPI_TFT || HAS_FSMC_TFT
29+
#error "Sorry! TFT displays are not available for Teensy 3.1/3.2."
30+
#endif
31+
2832
#if ENABLED(EMERGENCY_PARSER)
2933
#error "EMERGENCY_PARSER is not yet implemented for Teensy 3.1/3.2. Disable EMERGENCY_PARSER to continue."
3034
#endif
3135

3236
#if ENABLED(FAST_PWM_FAN) || SPINDLE_LASER_FREQUENCY
33-
#error "Features requiring Hardware PWM (FAST_PWM_FAN, SPINDLE_LASER_FREQUENCY) are not yet supported on Teensy 3.1/3.2."
37+
#error "Features requiring Hardware PWM (FAST_PWM_FAN, SPINDLE_LASER_FREQUENCY) are not yet supported for Teensy 3.1/3.2."
3438
#endif
3539

3640
#if HAS_TMC_SW_SERIAL
37-
#error "TMC220x Software Serial is not supported on Teensy 3.1/3.2."
41+
#error "TMC220x Software Serial is not supported for Teensy 3.1/3.2."
3842
#endif
3943

4044
#if ENABLED(POSTMORTEM_DEBUGGING)
41-
#error "POSTMORTEM_DEBUGGING is not yet supported on Teensy 3.1/3.2."
45+
#error "POSTMORTEM_DEBUGGING is not yet supported for Teensy 3.1/3.2."
4246
#endif
4347

4448
#if USING_PULLDOWNS
45-
#error "PULLDOWN pin mode is not available on Teensy 3.1/3.2 boards."
49+
#error "PULLDOWN pin mode is not available for Teensy 3.1/3.2."
4650
#endif

Marlin/src/HAL/TEENSY35_36/inc/Conditionals_LCD.h

-4
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,3 @@
2020
*
2121
*/
2222
#pragma once
23-
24-
#if HAS_SPI_TFT || HAS_FSMC_TFT
25-
#error "Sorry! TFT displays are not available for HAL/TEENSY35_36."
26-
#endif

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

+8-4
Original file line numberDiff line numberDiff line change
@@ -25,22 +25,26 @@
2525
* Test TEENSY35_36 specific configuration values for errors at compile-time.
2626
*/
2727

28+
#if HAS_SPI_TFT || HAS_FSMC_TFT
29+
#error "Sorry! TFT displays are not available for Teensy 3.5/3.6.
30+
#endif
31+
2832
#if ENABLED(EMERGENCY_PARSER)
2933
#error "EMERGENCY_PARSER is not yet implemented for Teensy 3.5/3.6. Disable EMERGENCY_PARSER to continue."
3034
#endif
3135

3236
#if ENABLED(FAST_PWM_FAN) || SPINDLE_LASER_FREQUENCY
33-
#error "Features requiring Hardware PWM (FAST_PWM_FAN, SPINDLE_LASER_FREQUENCY) are not yet supported on Teensy 3.5/3.6."
37+
#error "Features requiring Hardware PWM (FAST_PWM_FAN, SPINDLE_LASER_FREQUENCY) are not yet supported for Teensy 3.5/3.6."
3438
#endif
3539

3640
#if HAS_TMC_SW_SERIAL
37-
#error "TMC220x Software Serial is not supported on Teensy 3.5/3.6."
41+
#error "TMC220x Software Serial is not supported for Teensy 3.5/3.6."
3842
#endif
3943

4044
#if ENABLED(POSTMORTEM_DEBUGGING)
41-
#error "POSTMORTEM_DEBUGGING is not yet supported on Teensy 3.5/3.6."
45+
#error "POSTMORTEM_DEBUGGING is not yet supported for Teensy 3.5/3.6."
4246
#endif
4347

4448
#if USING_PULLDOWNS
45-
#error "PULLDOWN pin mode is not available on Teensy 3.5/3.6 boards."
49+
#error "PULLDOWN pin mode is not available for Teensy 3.5/3.6."
4650
#endif

Marlin/src/HAL/TEENSY40_41/inc/Conditionals_LCD.h

-4
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,3 @@
2020
*
2121
*/
2222
#pragma once
23-
24-
#if HAS_SPI_TFT || HAS_FSMC_TFT
25-
#error "Sorry! TFT displays are not available for HAL/TEENSY40_41."
26-
#endif

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

+7-3
Original file line numberDiff line numberDiff line change
@@ -25,18 +25,22 @@
2525
* Test TEENSY41 specific configuration values for errors at compile-time.
2626
*/
2727

28+
#if HAS_SPI_TFT || HAS_FSMC_TFT
29+
#error "Sorry! TFT displays are not available for Teensy 4.0/4.1."
30+
#endif
31+
2832
#if ENABLED(EMERGENCY_PARSER)
2933
#error "EMERGENCY_PARSER is not yet implemented for Teensy 4.0/4.1. Disable EMERGENCY_PARSER to continue."
3034
#endif
3135

3236
#if ENABLED(FAST_PWM_FAN) || SPINDLE_LASER_FREQUENCY
33-
#error "Features requiring Hardware PWM (FAST_PWM_FAN, SPINDLE_LASER_FREQUENCY) are not yet supported on Teensy 4.0/4.1."
37+
#error "Features requiring Hardware PWM (FAST_PWM_FAN, SPINDLE_LASER_FREQUENCY) are not yet supported for Teensy 4.0/4.1."
3438
#endif
3539

3640
#if HAS_TMC_SW_SERIAL
37-
#error "TMC220x Software Serial is not supported on Teensy 4.0/4.1."
41+
#error "TMC220x Software Serial is not supported for Teensy 4.0/4.1."
3842
#endif
3943

4044
#if ENABLED(POSTMORTEM_DEBUGGING)
41-
#error "POSTMORTEM_DEBUGGING is not yet supported on Teensy 4.0/4.1."
45+
#error "POSTMORTEM_DEBUGGING is not yet supported for Teensy 4.0/4.1."
4246
#endif

0 commit comments

Comments
 (0)