修正iis驱动
This commit is contained in:
parent
38fc71608d
commit
aa86f7f7bb
|
@ -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;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue