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:
edolomb 2017-10-01 16:05:58 +00:00
parent c6f5c2669f
commit 8314ce1ebf
2 changed files with 7 additions and 6 deletions

View File

@ -287,6 +287,7 @@ sama_dma_channel_t* dmaChannelAllocate(uint32_t priority,
/* Setting aic */
aicSetSourcePriority(id, priority);
aicEnableInt(id);
/* Enabling DMA clocks required by the current channel set.*/
if (id == ID_XDMAC0) {
pmcEnableXDMAC0();

View File

@ -230,7 +230,7 @@ typedef struct {
*/
#define dmaChannelDisable(dmachp) { \
(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); \