1
0
mirror of https://github.com/MarlinFirmware/Marlin.git synced 2024-11-30 07:17:59 +00:00

Skip impossible PWM sanity-checks

This commit is contained in:
Scott Lahteine 2020-03-22 00:19:05 -05:00
parent fe154fa5de
commit 580d314fbe
2 changed files with 2 additions and 1 deletions

View File

@ -160,6 +160,7 @@ void HAL_idletask();
#ifndef digitalPinHasPWM #ifndef digitalPinHasPWM
#define digitalPinHasPWM(P) (PIN_MAP[P].timer_device != nullptr) #define digitalPinHasPWM(P) (PIN_MAP[P].timer_device != nullptr)
#define NO_COMPILE_TIME_PWM
#endif #endif
#define CRITICAL_SECTION_START() uint32_t primask = __get_primask(); (void)__iCliRetVal() #define CRITICAL_SECTION_START() uint32_t primask = __get_primask(); (void)__iCliRetVal()

View File

@ -1985,7 +1985,7 @@ static_assert(Y_MAX_LENGTH >= Y_BED_SIZE, "Movement bounds (Y_MIN_POS, Y_MAX_POS
/** /**
* Auto Fan check for PWM pins * Auto Fan check for PWM pins
*/ */
#if HAS_AUTO_FAN && EXTRUDER_AUTO_FAN_SPEED != 255 #if HAS_AUTO_FAN && EXTRUDER_AUTO_FAN_SPEED != 255 && DISABLED(NO_COMPILE_TIME_PWM)
#define AF_ERR_SUFF "_AUTO_FAN_PIN is not a PWM pin. Set EXTRUDER_AUTO_FAN_SPEED to 255." #define AF_ERR_SUFF "_AUTO_FAN_PIN is not a PWM pin. Set EXTRUDER_AUTO_FAN_SPEED to 255."
#if HAS_AUTO_FAN_0 #if HAS_AUTO_FAN_0
static_assert(PWM_PIN(E0_AUTO_FAN_PIN), "E0" AF_ERR_SUFF); static_assert(PWM_PIN(E0_AUTO_FAN_PIN), "E0" AF_ERR_SUFF);