Skip to content

Commit

Permalink
🔧 Move TFT sanity checks
Browse files Browse the repository at this point in the history
  • Loading branch information
thinkyhead committed Apr 7, 2023
1 parent f0f5cd4 commit fa0b86f
Show file tree
Hide file tree
Showing 21 changed files with 63 additions and 64 deletions.
4 changes: 0 additions & 4 deletions Marlin/src/HAL/AVR/inc/Conditionals_LCD.h
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,3 @@
*
*/
#pragma once

#if HAS_SPI_TFT || HAS_FSMC_TFT
#error "Sorry! TFT displays are not available for HAL/AVR."
#endif
4 changes: 4 additions & 0 deletions Marlin/src/HAL/AVR/inc/SanityCheck.h
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,10 @@
* Test AVR-specific configuration values for errors at compile-time.
*/

#if HAS_SPI_TFT || HAS_FSMC_TFT
#error "Sorry! TFT displays are not available for HAL/AVR."
#endif

/**
* Check for common serial pin conflicts
*/
Expand Down
4 changes: 0 additions & 4 deletions Marlin/src/HAL/DUE/inc/Conditionals_LCD.h
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,3 @@
*
*/
#pragma once

#if HAS_SPI_TFT || HAS_FSMC_TFT
#error "Sorry! TFT displays are not available for HAL/DUE."
#endif
6 changes: 5 additions & 1 deletion Marlin/src/HAL/DUE/inc/SanityCheck.h
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,10 @@
* Test Arduino Due specific configuration values for errors at compile-time.
*/

#if HAS_SPI_TFT || HAS_FSMC_TFT
#error "Sorry! TFT displays are not available for HAL/DUE."
#endif

/**
* Check for common serial pin conflicts
*/
Expand Down Expand Up @@ -77,7 +81,7 @@
#endif

#if ENABLED(FAST_PWM_FAN) || SPINDLE_LASER_FREQUENCY
#error "Features requiring Hardware PWM (FAST_PWM_FAN, SPINDLE_LASER_FREQUENCY) are not yet supported on DUE."
#error "Features requiring Hardware PWM (FAST_PWM_FAN, SPINDLE_LASER_FREQUENCY) are not yet supported for HAL/DUE."
#endif

#if HAS_TMC_SW_SERIAL
Expand Down
4 changes: 0 additions & 4 deletions Marlin/src/HAL/ESP32/inc/Conditionals_LCD.h
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,3 @@
*
*/
#pragma once

#if HAS_SPI_TFT || HAS_FSMC_TFT
#error "Sorry! TFT displays are not available for HAL/ESP32."
#endif
11 changes: 9 additions & 2 deletions Marlin/src/HAL/ESP32/inc/SanityCheck.h
Original file line number Diff line number Diff line change
Expand Up @@ -21,12 +21,19 @@
*/
#pragma once

#if HAS_SPI_TFT || HAS_FSMC_TFT
#error "Sorry! TFT displays are not available for HAL/ESP32."
#endif

#if ENABLED(EMERGENCY_PARSER)
#error "EMERGENCY_PARSER is not yet implemented for ESP32. Disable EMERGENCY_PARSER to continue."
#endif

#if (ENABLED(SPINDLE_LASER_USE_PWM) && SPINDLE_LASER_FREQUENCY > 78125) || (ENABLED(FAST_PWM_FAN_FREQUENCY) && FAST_PWM_FAN_FREQUENCY > 78125)
#error "SPINDLE_LASER_FREQUENCY and FAST_PWM_FREQUENCY maximum value is 78125Hz for ESP32."
#if ENABLED(SPINDLE_LASER_USE_PWM) && SPINDLE_LASER_FREQUENCY > 78125
#error "SPINDLE_LASER_FREQUENCY maximum value is 78125Hz for ESP32."
#endif
#if ENABLED(FAST_PWM_FAN) && FAST_PWM_FAN_FREQUENCY > 78125
#error "FAST_PWM_FREQUENCY maximum value is 78125Hz for ESP32."
#endif

#if HAS_TMC_SW_SERIAL
Expand Down
4 changes: 0 additions & 4 deletions Marlin/src/HAL/LINUX/inc/Conditionals_LCD.h
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,3 @@
*
*/
#pragma once

#if HAS_SPI_TFT || HAS_FSMC_TFT
#error "Sorry! TFT displays are not available for HAL/LINUX."
#endif
10 changes: 7 additions & 3 deletions Marlin/src/HAL/LINUX/inc/SanityCheck.h
Original file line number Diff line number Diff line change
Expand Up @@ -31,13 +31,17 @@
#endif

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

#if HAS_SPI_TFT || HAS_FSMC_TFT
#error "Sorry! TFT displays are not available for HAL/LINUX."
#endif

#if HAS_TMC_SW_SERIAL
#error "TMC220x Software Serial is not supported on LINUX."
#error "TMC220x Software Serial is not supported for HAL/LINUX."
#endif

#if ENABLED(POSTMORTEM_DEBUGGING)
#error "POSTMORTEM_DEBUGGING is not yet supported on LINUX."
#error "POSTMORTEM_DEBUGGING is not yet supported for HAL/LINUX."
#endif
4 changes: 0 additions & 4 deletions Marlin/src/HAL/LPC1768/inc/Conditionals_LCD.h
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,3 @@
*
*/
#pragma once

#if HAS_FSMC_TFT
#error "Sorry! FSMC TFT displays are not current available for HAL/LPC1768."
#endif
4 changes: 4 additions & 0 deletions Marlin/src/HAL/LPC1768/inc/SanityCheck.h
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,10 @@ static_assert(!(NUM_SERVOS && ENABLED(FAST_PWM_FAN)), "BLTOUCH and Servos are in
#endif
#endif

#if HAS_FSMC_TFT
#error "Sorry! FSMC TFT displays are not current available for HAL/LPC1768."
#endif

static_assert(DISABLED(BAUD_RATE_GCODE), "BAUD_RATE_GCODE is not yet supported on LPC176x.");

/**
Expand Down
2 changes: 1 addition & 1 deletion Marlin/src/HAL/NATIVE_SIM/inc/SanityCheck.h
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
#endif

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

#if HAS_TMC_SW_SERIAL
Expand Down
8 changes: 0 additions & 8 deletions Marlin/src/HAL/SAMD21/inc/Conditionals_LCD.h
Original file line number Diff line number Diff line change
Expand Up @@ -20,12 +20,4 @@
*
*/

/**
* SAMD21 HAL developed by Bart Meijer (brupje)
* Based on SAMD51 HAL by Giuliano Zaro (AKA GMagician)
*/
#pragma once

#if HAS_SPI_TFT || HAS_FSMC_TFT
#error "Sorry! TFT displays are not available for HAL/SAMD21."
#endif
6 changes: 5 additions & 1 deletion Marlin/src/HAL/SAMD21/inc/SanityCheck.h
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,10 @@
* Test SAMD21 specific configuration values for errors at compile-time.
*/

#if HAS_SPI_TFT || HAS_FSMC_TFT
#error "Sorry! TFT displays are not available for HAL/SAMD21."
#endif

#if SERVO_TC == MF_TIMER_RTC
#error "Servos can't use RTC timer"
#endif
Expand All @@ -42,7 +46,7 @@
#endif

#if ENABLED(FAST_PWM_FAN)
#error "Features requiring Hardware PWM (FAST_PWM_FAN) are not yet supported on SAMD21."
#error "Features requiring Hardware PWM (FAST_PWM_FAN) are not yet supported for HAL/SAMD21."
#endif

#if ENABLED(POSTMORTEM_DEBUGGING)
Expand Down
4 changes: 0 additions & 4 deletions Marlin/src/HAL/SAMD51/inc/Conditionals_LCD.h
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,3 @@
*
*/
#pragma once

#if HAS_SPI_TFT || HAS_FSMC_TFT
#error "Sorry! TFT displays are not available for HAL/SAMD51."
#endif
6 changes: 5 additions & 1 deletion Marlin/src/HAL/SAMD51/inc/SanityCheck.h
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,10 @@
* Test SAMD51 specific configuration values for errors at compile-time.
*/

#if HAS_SPI_TFT || HAS_FSMC_TFT
#error "Sorry! TFT displays are not available for HAL/SAMD51."
#endif

#if ENABLED(FLASH_EEPROM_EMULATION)
#warning "Did you activate the SmartEEPROM? See https://github.com/GMagician/SAMD51-SmartEEprom-Manager/releases"
#endif
Expand All @@ -55,7 +59,7 @@
#endif

#if ENABLED(FAST_PWM_FAN) || SPINDLE_LASER_FREQUENCY
#error "Features requiring Hardware PWM (FAST_PWM_FAN, SPINDLE_LASER_FREQUENCY) are not yet supported on SAMD51."
#error "Features requiring Hardware PWM (FAST_PWM_FAN, SPINDLE_LASER_FREQUENCY) are not yet supported for HAL/SAMD51."
#endif

#if ENABLED(POSTMORTEM_DEBUGGING)
Expand Down
4 changes: 0 additions & 4 deletions Marlin/src/HAL/TEENSY31_32/inc/Conditionals_LCD.h
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,3 @@
*
*/
#pragma once

#if HAS_SPI_TFT || HAS_FSMC_TFT
#error "Sorry! TFT displays are not available for HAL/TEENSY31_32."
#endif
12 changes: 8 additions & 4 deletions Marlin/src/HAL/TEENSY31_32/inc/SanityCheck.h
Original file line number Diff line number Diff line change
Expand Up @@ -25,22 +25,26 @@
* Test TEENSY35_36 specific configuration values for errors at compile-time.
*/

#if HAS_SPI_TFT || HAS_FSMC_TFT
#error "Sorry! TFT displays are not available for Teensy 3.1/3.2."
#endif

#if ENABLED(EMERGENCY_PARSER)
#error "EMERGENCY_PARSER is not yet implemented for Teensy 3.1/3.2. Disable EMERGENCY_PARSER to continue."
#endif

#if ENABLED(FAST_PWM_FAN) || SPINDLE_LASER_FREQUENCY
#error "Features requiring Hardware PWM (FAST_PWM_FAN, SPINDLE_LASER_FREQUENCY) are not yet supported on Teensy 3.1/3.2."
#error "Features requiring Hardware PWM (FAST_PWM_FAN, SPINDLE_LASER_FREQUENCY) are not yet supported for Teensy 3.1/3.2."
#endif

#if HAS_TMC_SW_SERIAL
#error "TMC220x Software Serial is not supported on Teensy 3.1/3.2."
#error "TMC220x Software Serial is not supported for Teensy 3.1/3.2."
#endif

#if ENABLED(POSTMORTEM_DEBUGGING)
#error "POSTMORTEM_DEBUGGING is not yet supported on Teensy 3.1/3.2."
#error "POSTMORTEM_DEBUGGING is not yet supported for Teensy 3.1/3.2."
#endif

#if USING_PULLDOWNS
#error "PULLDOWN pin mode is not available on Teensy 3.1/3.2 boards."
#error "PULLDOWN pin mode is not available for Teensy 3.1/3.2."
#endif
4 changes: 0 additions & 4 deletions Marlin/src/HAL/TEENSY35_36/inc/Conditionals_LCD.h
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,3 @@
*
*/
#pragma once

#if HAS_SPI_TFT || HAS_FSMC_TFT
#error "Sorry! TFT displays are not available for HAL/TEENSY35_36."
#endif
12 changes: 8 additions & 4 deletions Marlin/src/HAL/TEENSY35_36/inc/SanityCheck.h
Original file line number Diff line number Diff line change
Expand Up @@ -25,22 +25,26 @@
* Test TEENSY35_36 specific configuration values for errors at compile-time.
*/

#if HAS_SPI_TFT || HAS_FSMC_TFT
#error "Sorry! TFT displays are not available for Teensy 3.5/3.6.
#endif

#if ENABLED(EMERGENCY_PARSER)
#error "EMERGENCY_PARSER is not yet implemented for Teensy 3.5/3.6. Disable EMERGENCY_PARSER to continue."
#endif

#if ENABLED(FAST_PWM_FAN) || SPINDLE_LASER_FREQUENCY
#error "Features requiring Hardware PWM (FAST_PWM_FAN, SPINDLE_LASER_FREQUENCY) are not yet supported on Teensy 3.5/3.6."
#error "Features requiring Hardware PWM (FAST_PWM_FAN, SPINDLE_LASER_FREQUENCY) are not yet supported for Teensy 3.5/3.6."
#endif

#if HAS_TMC_SW_SERIAL
#error "TMC220x Software Serial is not supported on Teensy 3.5/3.6."
#error "TMC220x Software Serial is not supported for Teensy 3.5/3.6."
#endif

#if ENABLED(POSTMORTEM_DEBUGGING)
#error "POSTMORTEM_DEBUGGING is not yet supported on Teensy 3.5/3.6."
#error "POSTMORTEM_DEBUGGING is not yet supported for Teensy 3.5/3.6."
#endif

#if USING_PULLDOWNS
#error "PULLDOWN pin mode is not available on Teensy 3.5/3.6 boards."
#error "PULLDOWN pin mode is not available for Teensy 3.5/3.6."
#endif
4 changes: 0 additions & 4 deletions Marlin/src/HAL/TEENSY40_41/inc/Conditionals_LCD.h
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,3 @@
*
*/
#pragma once

#if HAS_SPI_TFT || HAS_FSMC_TFT
#error "Sorry! TFT displays are not available for HAL/TEENSY40_41."
#endif
10 changes: 7 additions & 3 deletions Marlin/src/HAL/TEENSY40_41/inc/SanityCheck.h
Original file line number Diff line number Diff line change
Expand Up @@ -25,18 +25,22 @@
* Test TEENSY41 specific configuration values for errors at compile-time.
*/

#if HAS_SPI_TFT || HAS_FSMC_TFT
#error "Sorry! TFT displays are not available for Teensy 4.0/4.1."
#endif

#if ENABLED(EMERGENCY_PARSER)
#error "EMERGENCY_PARSER is not yet implemented for Teensy 4.0/4.1. Disable EMERGENCY_PARSER to continue."
#endif

#if ENABLED(FAST_PWM_FAN) || SPINDLE_LASER_FREQUENCY
#error "Features requiring Hardware PWM (FAST_PWM_FAN, SPINDLE_LASER_FREQUENCY) are not yet supported on Teensy 4.0/4.1."
#error "Features requiring Hardware PWM (FAST_PWM_FAN, SPINDLE_LASER_FREQUENCY) are not yet supported for Teensy 4.0/4.1."
#endif

#if HAS_TMC_SW_SERIAL
#error "TMC220x Software Serial is not supported on Teensy 4.0/4.1."
#error "TMC220x Software Serial is not supported for Teensy 4.0/4.1."
#endif

#if ENABLED(POSTMORTEM_DEBUGGING)
#error "POSTMORTEM_DEBUGGING is not yet supported on Teensy 4.0/4.1."
#error "POSTMORTEM_DEBUGGING is not yet supported for Teensy 4.0/4.1."
#endif

0 comments on commit fa0b86f

Please sign in to comment.