From 5e477ae0acc793b492ac4cf32cecc9403bfb0d5d Mon Sep 17 00:00:00 2001 From: xx Date: Wed, 28 Mar 2018 12:27:04 +0800 Subject: [PATCH] =?UTF-8?q?[imx-rt]=E5=9C=A8=E5=9B=9E=E8=B0=83=E5=87=BD?= =?UTF-8?q?=E6=95=B0=E6=89=A7=E8=A1=8C=E5=90=8E=E6=89=8D=E6=B8=85=E9=99=A4?= =?UTF-8?q?=E6=9C=AC=E6=AC=A1=E4=BC=A0=E8=BE=93=E4=BF=A1=E6=81=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- bsp/imxrt1052-evk/Libraries/drivers/fsl_sai_edma.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/bsp/imxrt1052-evk/Libraries/drivers/fsl_sai_edma.c b/bsp/imxrt1052-evk/Libraries/drivers/fsl_sai_edma.c index 6f4dda699..c48a5aacd 100644 --- a/bsp/imxrt1052-evk/Libraries/drivers/fsl_sai_edma.c +++ b/bsp/imxrt1052-evk/Libraries/drivers/fsl_sai_edma.c @@ -91,12 +91,12 @@ static void SAI_TxEDMACallback(edma_handle_t *handle, void *userData, bool done, sai_edma_handle_t *saiHandle = privHandle->handle; /* If finished a blcok, call the callback function */ - memset(&saiHandle->saiQueue[saiHandle->queueDriver], 0, sizeof(sai_transfer_t)); - saiHandle->queueDriver = (saiHandle->queueDriver + 1) % SAI_XFER_QUEUE_SIZE; if (saiHandle->callback) { (saiHandle->callback)(privHandle->base, saiHandle, kStatus_SAI_TxIdle, saiHandle->userData); - } + } + memset(&saiHandle->saiQueue[saiHandle->queueDriver], 0, sizeof(sai_transfer_t)); + saiHandle->queueDriver = (saiHandle->queueDriver + 1) % SAI_XFER_QUEUE_SIZE; /* If all data finished, just stop the transfer */ if (saiHandle->saiQueue[saiHandle->queueDriver].data == NULL)