From f3a95efa38e0e930174dd80bd9a5cd29cc9bc08a Mon Sep 17 00:00:00 2001 From: Michael Keller Date: Mon, 1 Jul 2019 01:46:31 +1200 Subject: [PATCH] =?UTF-8?q?Fixed=20build=20if=20none=20of=20USE=5FDSHOT,?= =?UTF-8?q?=20USE=5FLED=5FSTRIP,=20USE=5FTRANSPONDE=E2=80=A6=20(#8506)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Fixed build if none of USE_DSHOT, USE_LED_STRIP, USE_TRANSPONDER are defined. --- src/main/drivers/timer.h | 2 +- src/main/drivers/timer_def.h | 2 +- src/main/target/common_post.h | 6 ++++++ 3 files changed, 8 insertions(+), 2 deletions(-) diff --git a/src/main/drivers/timer.h b/src/main/drivers/timer.h index bb9d08a686..c46c96711e 100644 --- a/src/main/drivers/timer.h +++ b/src/main/drivers/timer.h @@ -107,7 +107,7 @@ typedef struct timerHardware_s { #if defined(STM32F3) || defined(STM32F4) || defined(STM32F7) 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) DMA_Stream_TypeDef *dmaRefConfigured; diff --git a/src/main/drivers/timer_def.h b/src/main/drivers/timer_def.h index f32bad84d2..be1ec14619 100644 --- a/src/main/drivers/timer_def.h +++ b/src/main/drivers/timer_def.h @@ -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(...) diff --git a/src/main/target/common_post.h b/src/main/target/common_post.h index 7cefec3432..bc6600fbe9 100644 --- a/src/main/target/common_post.h +++ b/src/main/target/common_post.h @@ -289,6 +289,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