2017-07-31 08:31:14 +02:00
/**
* Marlin 3 D Printer Firmware
2020-02-03 15:00:57 +01:00
* Copyright ( c ) 2020 MarlinFirmware [ https : //github.com/MarlinFirmware/Marlin]
2017-07-31 08:31:14 +02:00
*
* Based on Sprinter and grbl .
2019-06-28 06:57:50 +02:00
* Copyright ( c ) 2011 Camiel Gubbels / Erik van der Zalm
2017-07-31 08:31:14 +02:00
*
* This program is free software : you can redistribute it and / or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation , either version 3 of the License , or
* ( at your option ) any later version .
*
* This program is distributed in the hope that it will be useful ,
* but WITHOUT ANY WARRANTY ; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE . See the
* GNU General Public License for more details .
*
* You should have received a copy of the GNU General Public License
* along with this program . If not , see < http : //www.gnu.org/licenses/>.
*
*/
2018-11-04 09:25:55 +01:00
# pragma once
2017-07-31 08:31:14 +02:00
/**
2019-06-28 06:06:49 +02:00
* Test AVR - specific configuration values for errors at compile - time .
2017-07-31 08:31:14 +02:00
*/
/**
* Digipot requirement
*/
# if ENABLED(DIGIPOT_MCP4018)
# if !defined(DIGIPOTS_I2C_SDA_X) || !defined(DIGIPOTS_I2C_SDA_Y) || !defined(DIGIPOTS_I2C_SDA_Z) \
| | ! defined ( DIGIPOTS_I2C_SDA_E0 ) | | ! defined ( DIGIPOTS_I2C_SDA_E1 )
# error "DIGIPOT_MCP4018 requires DIGIPOTS_I2C_SDA_* pins to be defined."
# endif
# endif
2019-03-08 09:15:42 +01:00
/**
* Checks for FAST PWM
*/
# if ENABLED(FAST_PWM_FAN) && (ENABLED(USE_OCR2A_AS_TOP) && defined(TCCR2))
2019-12-16 03:23:59 +01:00
# error "USE_OCR2A_AS_TOP does not apply to devices with a single output TIMER2"
2019-03-08 09:15:42 +01:00
# endif
2017-07-31 08:31:14 +02:00
/**
2019-06-28 06:06:49 +02:00
* Sanity checks for Spindle / Laser PWM
2017-07-31 08:31:14 +02:00
*/
2019-06-28 06:06:49 +02:00
# if ENABLED(SPINDLE_LASER_PWM)
# if SPINDLE_LASER_PWM_PIN == 4 || WITHIN(SPINDLE_LASER_PWM_PIN, 11, 13)
# error "Counter / Timer for SPINDLE_LASER_PWM_PIN is used by a system interrupt."
# elif NUM_SERVOS > 0 && (WITHIN(SPINDLE_LASER_PWM_PIN, 2, 3) || SPINDLE_LASER_PWM_PIN == 5)
# error "Counter / Timer for SPINDLE_LASER_PWM_PIN is used by the servo system."
2017-07-31 08:31:14 +02:00
# endif
2019-06-28 06:06:49 +02:00
# endif
2017-10-15 02:05:10 +02:00
2018-01-19 19:19:34 +01:00
/**
2018-12-09 06:34:26 +01:00
* The Trinamic library includes SoftwareSerial . h , leading to a compile error .
2018-01-19 19:19:34 +01:00
*/
2018-12-09 06:34:26 +01:00
# if HAS_TRINAMIC && ENABLED(ENDSTOP_INTERRUPTS_FEATURE)
# error "TMCStepper includes SoftwareSerial.h which is incompatible with ENDSTOP_INTERRUPTS_FEATURE. Disable ENDSTOP_INTERRUPTS_FEATURE to continue."
2018-01-19 19:19:34 +01:00
# endif
2020-01-20 05:25:38 +01:00
2020-02-09 04:01:57 +01:00
# if HAS_TMC_SW_SERIAL && ENABLED(MONITOR_DRIVER_STATUS)
2020-01-20 05:25:38 +01:00
# error "MONITOR_DRIVER_STATUS causes performance issues when used with SoftwareSerial-connected drivers. Disable MONITOR_DRIVER_STATUS or use hardware serial to continue."
# endif