From de0046fc8be4aaa6b84390841f06f3a3a891e28a Mon Sep 17 00:00:00 2001 From: Scott Lahteine Date: Sat, 30 Mar 2019 23:04:40 -0500 Subject: [PATCH] Fix empty HAS_TIMER macros --- Marlin/src/HAL/HAL_STM32/fastio_STM32.h | 2 +- Marlin/src/HAL/HAL_STM32F4/fastio_STM32F4.h | 4 ++-- Marlin/src/HAL/HAL_STM32F7/fastio_STM32F7.h | 4 ++-- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/Marlin/src/HAL/HAL_STM32/fastio_STM32.h b/Marlin/src/HAL/HAL_STM32/fastio_STM32.h index d575e9cf40..bd2edb4495 100644 --- a/Marlin/src/HAL/HAL_STM32/fastio_STM32.h +++ b/Marlin/src/HAL/HAL_STM32/fastio_STM32.h @@ -80,7 +80,7 @@ void FastIO_init(); // Must be called before using fast io macros #define IS_INPUT(IO) #define IS_OUTPUT(IO) -#define HAS_TIMER(IO) +#define HAS_TIMER(IO) digitalPinHasPWM(IO) #define PWM_PIN(P) HAS_TIMER(P) #define USEABLE_HARDWARE_PWM(P) PWM_PIN(P) diff --git a/Marlin/src/HAL/HAL_STM32F4/fastio_STM32F4.h b/Marlin/src/HAL/HAL_STM32F4/fastio_STM32F4.h index 5ad6227e25..bac5bdabca 100644 --- a/Marlin/src/HAL/HAL_STM32F4/fastio_STM32F4.h +++ b/Marlin/src/HAL/HAL_STM32F4/fastio_STM32F4.h @@ -50,9 +50,9 @@ #define IS_INPUT(IO) #define IS_OUTPUT(IO) -#define HAS_TIMER(IO) +#define HAS_TIMER(IO) true -#define PWM_PIN(P) true +#define PWM_PIN(P) HAS_TIMER(P) #define USEABLE_HARDWARE_PWM(P) PWM_PIN(P) // digitalRead/Write wrappers diff --git a/Marlin/src/HAL/HAL_STM32F7/fastio_STM32F7.h b/Marlin/src/HAL/HAL_STM32F7/fastio_STM32F7.h index 1a19e1c3f6..50b071ff30 100644 --- a/Marlin/src/HAL/HAL_STM32F7/fastio_STM32F7.h +++ b/Marlin/src/HAL/HAL_STM32F7/fastio_STM32F7.h @@ -49,9 +49,9 @@ #define IS_INPUT(IO) #define IS_OUTPUT(IO) -#define HAS_TIMER(IO) +#define HAS_TIMER(IO) true -#define PWM_PIN(P) true +#define PWM_PIN(P) HAS_TIMER(P) #define USEABLE_HARDWARE_PWM(P) PWM_PIN(P) // digitalRead/Write wrappers