Skip to content

Commit

Permalink
Merge pull request #9490 from jflyper/bfdev-fix-overlooked-case-from-…
Browse files Browse the repository at this point in the history
…unified-dma-instance-handling

Fix overlooked case in unified DMA instance handling
  • Loading branch information
mikeller committed Feb 18, 2020
2 parents 6bb7dbb + 8c772ba commit cf27af8
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/main/drivers/pwm_output_dshot_hal_hal.c
Original file line number Diff line number Diff line change
Expand Up @@ -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) */
Expand Down Expand Up @@ -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) */
Expand Down

0 comments on commit cf27af8

Please sign in to comment.