Browse Source

Fix empty HAS_TIMER macros

pull/1/head
Scott Lahteine 6 years ago
parent
commit
de0046fc8b
  1. 2
      Marlin/src/HAL/HAL_STM32/fastio_STM32.h
  2. 4
      Marlin/src/HAL/HAL_STM32F4/fastio_STM32F4.h
  3. 4
      Marlin/src/HAL/HAL_STM32F7/fastio_STM32F7.h

2
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_INPUT(IO)
#define IS_OUTPUT(IO) #define IS_OUTPUT(IO)
#define HAS_TIMER(IO) #define HAS_TIMER(IO) digitalPinHasPWM(IO)
#define PWM_PIN(P) HAS_TIMER(P) #define PWM_PIN(P) HAS_TIMER(P)
#define USEABLE_HARDWARE_PWM(P) PWM_PIN(P) #define USEABLE_HARDWARE_PWM(P) PWM_PIN(P)

4
Marlin/src/HAL/HAL_STM32F4/fastio_STM32F4.h

@ -50,9 +50,9 @@
#define IS_INPUT(IO) #define IS_INPUT(IO)
#define IS_OUTPUT(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) #define USEABLE_HARDWARE_PWM(P) PWM_PIN(P)
// digitalRead/Write wrappers // digitalRead/Write wrappers

4
Marlin/src/HAL/HAL_STM32F7/fastio_STM32F7.h

@ -49,9 +49,9 @@
#define IS_INPUT(IO) #define IS_INPUT(IO)
#define IS_OUTPUT(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) #define USEABLE_HARDWARE_PWM(P) PWM_PIN(P)
// digitalRead/Write wrappers // digitalRead/Write wrappers

Loading…
Cancel
Save