From 8c772bafbea69034f2dc53bd78d374ddb9a17750 Mon Sep 17 00:00:00 2001 From: jflyper Date: Mon, 17 Feb 2020 10:51:27 +0900 Subject: [PATCH] Fix overlooked case in unified DMA instance handling --- src/main/drivers/pwm_output_dshot_hal_hal.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/main/drivers/pwm_output_dshot_hal_hal.c b/src/main/drivers/pwm_output_dshot_hal_hal.c index 465b28273..24ab163ec 100644 --- a/src/main/drivers/pwm_output_dshot_hal_hal.c +++ b/src/main/drivers/pwm_output_dshot_hal_hal.c @@ -384,7 +384,7 @@ P - High - High - memset(motor->timer->dmaBurstBuffer, 0, DSHOT_DMA_BUFFER_SIZE * 4 * sizeof(uint32_t)); /* Set hdma_tim instance */ - motor->timer->hdma_tim.Instance = dmaRef; + motor->timer->hdma_tim.Instance = (DMA_ARCH_TYPE *)dmaRef; motor->timer->hdma_tim.Init.Request = dmaChannel; /* Link hdma_tim to hdma[TIM_DMA_ID_UPDATE] (update) */ @@ -412,7 +412,7 @@ P - High - High - motor->dmaBuffer[DSHOT_DMA_BUFFER_SIZE-2] = 0; // XXX Is this necessary? -> probably. motor->dmaBuffer[DSHOT_DMA_BUFFER_SIZE-1] = 0; // XXX Is this necessary? - motor->hdma_tim.Instance = dmaRef; + motor->hdma_tim.Instance = (DMA_ARCH_TYPE *)dmaRef; motor->hdma_tim.Init.Request = dmaChannel; /* Link hdma_tim to hdma[x] (channelx) */