Browse Source

Skip impossible PWM sanity-checks

vanilla_fb_2.0.x
Scott Lahteine 5 years ago
parent
commit
580d314fbe
  1. 1
      Marlin/src/HAL/STM32F1/HAL.h
  2. 2
      Marlin/src/inc/SanityCheck.h

1
Marlin/src/HAL/STM32F1/HAL.h

@ -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()

2
Marlin/src/inc/SanityCheck.h

@ -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);

Loading…
Cancel
Save