Sanity-check for CASE_LIGHT_PIN (#14518)

This commit is contained in:
Ludy
2019-07-06 03:18:43 +02:00
committed by Scott Lahteine
parent 253d0f9671
commit a210f80adc
2 changed files with 8 additions and 4 deletions

View File

@ -1408,10 +1408,14 @@ static_assert(Y_MAX_LENGTH >= Y_BED_SIZE, "Movement bounds (Y_MIN_POS, Y_MAX_POS
#endif
/**
* Test case light not using the same pin as the fan
* Case Light requirements
*/
#if ENABLED(CASE_LIGHT_ENABLE) && CASE_LIGHT_PIN == FAN_PIN
#error "You cannot set CASE_LIGHT_PIN equal to FAN_PIN."
#if ENABLED(CASE_LIGHT_ENABLE)
#if !PIN_EXISTS(CASE_LIGHT)
#error "CASE_LIGHT_ENABLE requires CASE_LIGHT_PIN to be defined."
#elif CASE_LIGHT_PIN == FAN_PIN
#error "CASE_LIGHT_PIN conflicts with FAN_PIN. Resolve before continuing."
#endif
#endif
/**