Minor changes in sama_xdmac driver
git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@10738 35acf78f-673a-0410-8e92-d51de3d6d3f4
This commit is contained in:
parent
c6f5c2669f
commit
8314ce1ebf
|
@ -287,6 +287,7 @@ sama_dma_channel_t* dmaChannelAllocate(uint32_t priority,
|
||||||
/* Setting aic */
|
/* Setting aic */
|
||||||
aicSetSourcePriority(id, priority);
|
aicSetSourcePriority(id, priority);
|
||||||
aicEnableInt(id);
|
aicEnableInt(id);
|
||||||
|
|
||||||
/* Enabling DMA clocks required by the current channel set.*/
|
/* Enabling DMA clocks required by the current channel set.*/
|
||||||
if (id == ID_XDMAC0) {
|
if (id == ID_XDMAC0) {
|
||||||
pmcEnableXDMAC0();
|
pmcEnableXDMAC0();
|
||||||
|
|
|
@ -228,12 +228,12 @@ typedef struct {
|
||||||
*
|
*
|
||||||
* @special
|
* @special
|
||||||
*/
|
*/
|
||||||
#define dmaChannelDisable(dmachp) { \
|
#define dmaChannelDisable(dmachp) { \
|
||||||
(dmachp)->xdmac->XDMAC_GD |= XDMAC_GD_DI0 << ((dmachp)->chid); \
|
(dmachp)->xdmac->XDMAC_GD |= XDMAC_GD_DI0 << ((dmachp)->chid); \
|
||||||
while (((dmachp)->xdmac->XDMAC_GS) & (XDMAC_GS_ST0 << (dmachp)->chid)) == 1) { \
|
while ((((dmachp)->xdmac->XDMAC_GS) & (XDMAC_GS_ST0 << (dmachp)->chid)) == 1) { \
|
||||||
; \
|
; \
|
||||||
} \
|
} \
|
||||||
dmaGetChannelInt(dmachp); \
|
dmaGetChannelInt(dmachp); \
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
Loading…
Reference in New Issue