mirror of https://github.com/rusefi/ChibiOS.git
Proper DMA stop after copy operation finished.
git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@3842 35acf78f-673a-0410-8e92-d51de3d6d3f4
This commit is contained in:
parent
6186d5a390
commit
c3e9fad51e
|
@ -364,8 +364,11 @@ typedef void (*stm32_dmaisr_t)(void *p, uint32_t flags);
|
|||
* @param[in] dmastp pointer to a stm32_dma_stream_t structure
|
||||
*/
|
||||
#define dmaWaitCompletion(dmastp) \
|
||||
while (((dmastp)->channel->CNDTR > 0) && \
|
||||
((dmastp)->channel->CCR & STM32_DMA_CR_EN))
|
||||
while ((dmastp)->channel->CNDTR > 0) \
|
||||
; \
|
||||
dmaStreamDisable(dmastp); \
|
||||
}
|
||||
|
||||
/** @} */
|
||||
|
||||
/*===========================================================================*/
|
||||
|
|
|
@ -355,8 +355,10 @@ typedef void (*stm32_dmaisr_t)(void *p, uint32_t flags);
|
|||
* @param[in] dmastp pointer to a stm32_dma_stream_t structure
|
||||
*/
|
||||
#define dmaWaitCompletion(dmastp) \
|
||||
while (((dmastp)->channel->CNDTR > 0) && \
|
||||
((dmastp)->channel->CCR & STM32_DMA_CR_EN))
|
||||
while ((dmastp)->channel->CNDTR > 0) \
|
||||
; \
|
||||
dmaStreamDisable(dmastp); \
|
||||
}
|
||||
/** @} */
|
||||
|
||||
/*===========================================================================*/
|
||||
|
|
Loading…
Reference in New Issue