Fixed build if none of USE_DSHOT, USE_LED_STRIP, USE_TRANSPONDE… (#8506)

Fixed build if none of USE_DSHOT, USE_LED_STRIP, USE_TRANSPONDER are defined.
This commit is contained in:
Michael Keller 2019-07-01 01:46:31 +12:00 committed by GitHub
commit 3936bbaf25
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
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