Merge pull request #9490 from jflyper/bfdev-fix-overlooked-case-from-unified-dma-instance-handling

Fix overlooked case in unified DMA instance handling
This commit is contained in:
Michael Keller 2020-02-19 00:00:01 +13:00 committed by GitHub
commit cf27af891a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 2 deletions

View File

@ -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) */