From d6f80d88f4399fd26ff71c2079ed5482eb9624c5 Mon Sep 17 00:00:00 2001 From: edolomb Date: Fri, 22 Sep 2017 14:27:32 +0000 Subject: Minor changes in XDMAC driver git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@10683 35acf78f-673a-0410-8e92-d51de3d6d3f4 --- os/hal/ports/SAMA/LLD/DMAv1/sama_xdmac.h | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'os/hal/ports') diff --git a/os/hal/ports/SAMA/LLD/DMAv1/sama_xdmac.h b/os/hal/ports/SAMA/LLD/DMAv1/sama_xdmac.h index 96c11b479..609021e00 100644 --- a/os/hal/ports/SAMA/LLD/DMAv1/sama_xdmac.h +++ b/os/hal/ports/SAMA/LLD/DMAv1/sama_xdmac.h @@ -228,12 +228,12 @@ typedef struct { * * @special */ -#define dmaChannelDisable(dmachp) { \ - (dmachp)->xdmac->XDMAC_GD |= XDMAC_GD_DI0 << ((dmachp)->chid); \ - while ((dmachp)->xdmac->XDMAC_GS == (XDMAC_GS_ST0 << (dmachp)->chid)) { \ - ; \ - } \ - dmaGetChannelInt(dmachp); \ +#define dmaChannelDisable(dmachp) { \ + (dmachp)->xdmac->XDMAC_GD |= XDMAC_GD_DI0 << ((dmachp)->chid); \ + while (((dmachp)->xdmac->XDMAC_GS) & (XDMAC_GS_ST0 << (dmachp)->chid)) == 1) { \ + ; \ + } \ + dmaGetChannelInt(dmachp); \ } /** -- cgit v1.2.3