git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@1262 35acf78f-673a-0410-8e92-d51de3d6d3f4
This commit is contained in:
parent
37182851ef
commit
bf464a835d
|
@ -45,11 +45,8 @@ static cnt_t dmacnt2;
|
|||
void dmaInit(void) {
|
||||
|
||||
dmacnt1 = 0;
|
||||
DMA1->IFCR = 0x0FFFFFFF;
|
||||
|
||||
#if defined(STM32F10X_HD) || defined (STM32F10X_CL)
|
||||
dmacnt2 = 0;
|
||||
DMA2->IFCR = 0x0FFFFFFF;
|
||||
#endif
|
||||
}
|
||||
|
||||
|
@ -62,13 +59,17 @@ void dmaEnable(uint32_t dma) {
|
|||
|
||||
switch (dma) {
|
||||
case DMA1_ID:
|
||||
if (dmacnt1++ == 0)
|
||||
if (dmacnt1++ == 0) {
|
||||
RCC->AHBENR |= RCC_AHBENR_DMA1EN;
|
||||
DMA1->IFCR = 0x0FFFFFFF;
|
||||
}
|
||||
break;
|
||||
#if defined(STM32F10X_HD) || defined (STM32F10X_CL)
|
||||
case DMA2_ID:
|
||||
if (dmacnt2++ == 0)
|
||||
if (dmacnt2++ == 0) {
|
||||
RCC->AHBENR |= RCC_AHBENR_DMA2EN;
|
||||
DMA2->IFCR = 0x0FFFFFFF;
|
||||
}
|
||||
break;
|
||||
#endif
|
||||
}
|
||||
|
|
|
@ -3,6 +3,9 @@
|
|||
*****************************************************************************
|
||||
|
||||
*** 1.3.4 ***
|
||||
- FIX: Fixed wrong conditional in chschd.c (bug 2888836).
|
||||
- FIX: Fixed wrong macro in chheap.c (bug 2888833).
|
||||
- FIX: Fixed AIC initialization in AT91SAM7X support (bug 2888583).
|
||||
- NEW: New SPI (master) driver model.
|
||||
- NEW: SPI driver for STM32 implementing the new SPI driver model.
|
||||
|
||||
|
|
Loading…
Reference in New Issue