timers: define ADVANCED_TIMERS in a "portable" manner
gcc7.2 complained about the old syntax. So, be more verbose. Fixes: https://github.com/libopencm3/libopencm3/issues/826
This commit is contained in:
@@ -114,7 +114,11 @@ knob.
|
|||||||
#include <libopencm3/stm32/timer.h>
|
#include <libopencm3/stm32/timer.h>
|
||||||
#include <libopencm3/stm32/rcc.h>
|
#include <libopencm3/stm32/rcc.h>
|
||||||
|
|
||||||
#define ADVANCED_TIMERS (defined(TIM1_BASE) || defined(TIM8_BASE))
|
#if (defined(TIM1_BASE) || defined(TIM8_BASE))
|
||||||
|
#define ADVANCED_TIMERS 1
|
||||||
|
#else
|
||||||
|
#define ADVANCED_TIMERS 0
|
||||||
|
#endif
|
||||||
|
|
||||||
#if defined(TIM8)
|
#if defined(TIM8)
|
||||||
#define TIMER_IS_ADVANCED(periph) (((periph) == TIM1) || ((periph) == TIM8))
|
#define TIMER_IS_ADVANCED(periph) (((periph) == TIM1) || ((periph) == TIM8))
|
||||||
|
|||||||
Reference in New Issue
Block a user