1.37.5.5 DMAC_ChannelTransferStatusGet Function

C

DMAC_TRANSFER_EVENT DMAC_ChannelTransferStatusGet(DMAC_CHANNEL channel)

Summary

Returns the DMA channel's transfer status

Description

Returns the DMA channel's transfer status

Precondition

DMAC should have been initialized by calling the DMAC_Initialize.

Parameters

Param Description
DMAC_CHANNEL channel the particular channel to be interrogated

Returns

- DMAC_TRANSFER_EVENT - enum of type DMAC_TRANSFER_EVENT indicating the status of the DMA transfer

Example

bool isBusy;

isBusy = DMAC_ChannelIsBusy(DMAC_CHANNEL_0);

if (isBusy == false)
{
    if (DMAC_ChannelTransferStatusGet() == DMAC_TRANSFER_EVENT_ERROR)
    {
        // DMA transfer error
    }
    else
    {
        // DMA transfer successful
    }
}

Remarks

None.