Fixed bug #510.
git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@6977 35acf78f-673a-0410-8e92-d51de3d6d3f4master
parent
65e3013e8c
commit
2e59e3f93c
|
@ -472,7 +472,18 @@ void dmaStreamRelease(const stm32_dma_stream_t *dmastp) {
|
||||||
"not allocated");
|
"not allocated");
|
||||||
|
|
||||||
/* Disables the associated IRQ vector.*/
|
/* Disables the associated IRQ vector.*/
|
||||||
|
#if !(STM32_HAS_DMA2 && !defined(STM32F10X_CL)) || defined(__DOXYGEN__)
|
||||||
nvicDisableVector(dmastp->vector);
|
nvicDisableVector(dmastp->vector);
|
||||||
|
#else
|
||||||
|
/* Check unless it is 10 or 11 stream. If yes, make additional check before
|
||||||
|
disabling IRQ.*/
|
||||||
|
if (dmastp->selfindex < 10)
|
||||||
|
nvicDisableVector(dmastp->vector);
|
||||||
|
else {
|
||||||
|
if (dma_streams_mask & (3 << 10) == 0)
|
||||||
|
nvicDisableVector(dmastp->vector);
|
||||||
|
}
|
||||||
|
#endif/* STM32_HAS_DMA2 && !STM32F10X_CL */
|
||||||
|
|
||||||
/* Marks the stream as not allocated.*/
|
/* Marks the stream as not allocated.*/
|
||||||
dma_streams_mask &= ~(1 << dmastp->selfindex);
|
dma_streams_mask &= ~(1 << dmastp->selfindex);
|
||||||
|
|
Loading…
Reference in New Issue