提交 aa86f7f7 编写于 作者: H heyuanjie

修正iis驱动

上级 38fc7160
......@@ -99,7 +99,7 @@ static void SAI_TxEDMACallback(edma_handle_t *handle, void *userData, bool done,
saiHandle->queueDriver = (saiHandle->queueDriver + 1) % SAI_XFER_QUEUE_SIZE;
/* If all data finished, just stop the transfer */
if (saiHandle->saiQueue[saiHandle->queueDriver].data == NULL)
if (saiHandle->saiQueue[saiHandle->queueDriver].dataSize == 0)
{
/* Disable DMA enable bit */
SAI_TxEnableDMA(privHandle->base, kSAI_FIFORequestDMAEnable, false);
......
......@@ -347,7 +347,8 @@ static rt_size_t icodec_transmit(struct rt_audio_device *audio, const void *writ
xfer.data = (uint8_t *)writeBuf;
xfer.dataSize = size;
SAI_TransferSendEDMA(icodec->sai, &icodec->txHandle, &xfer);
if (SAI_TransferSendEDMA(icodec->sai, &icodec->txHandle, &xfer) != kStatus_Success)
return 0;
return size;
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册