Fixed build if none of USE_DSHOT, USE_LED_STRIP, USE_TRANSPONDER are defined.

This commit is contained in:
mikeller 2019-06-29 19:43:15 +12:00
parent 23ca254277
commit 72d05f682c
3 changed files with 8 additions and 2 deletions

View File

@ -112,7 +112,7 @@ typedef struct timerHardware_s {
#if defined(STM32F3) || defined(STM32F4) || defined(STM32F7) || defined(STM32H7)
uint8_t alternateFunction;
#endif
#if defined(USE_DSHOT) || defined(USE_LED_STRIP) || defined(USE_TRANSPONDER)
#if defined(USE_TIMER_DMA)
#if defined(USE_DMA_SPEC)
#if defined(STM32F4) || defined(STM32F7) || defined(STM32H7)
DMA_Stream_TypeDef *dmaRefConfigured;

View File

@ -24,7 +24,7 @@
#include "common/utils.h"
// allow conditional definition of DMA related members
#if defined(USE_DSHOT) || defined(USE_LED_STRIP) || defined(USE_TRANSPONDER)
#if defined(USE_TIMER_DMA)
# define DEF_TIM_DMA_COND(...) __VA_ARGS__
#else
# define DEF_TIM_DMA_COND(...)

View File

@ -310,6 +310,12 @@
#undef BEEPER_PWM_HZ
#endif
#if defined(USE_DSHOT) || defined(USE_LED_STRIP) || defined(USE_TRANSPONDER)
#define USE_TIMER_DMA
#else
#undef USE_DMA_SPEC
#endif
#if !defined(USE_DMA_SPEC)
#undef USE_TIMER_MGMT
#endif