1.2.5.4 1.9.4.4 DMA_ChannelIsBusy Function
C
bool DMA_ChannelIsBusy ( DMA_CHANNEL channel )
Summary
The function returns the busy status of the channel.
Description
The function returns true if the specified channel is busy with a transfer. This function can be used to poll for the completion of transfer that was started by calling the DMA_ChannelTransfer() function. This function can be used as a polling alternative to setting a callback function and receiving an asynchronous notification for transfer notification.
Precondition
DMA should have been initialized by calling DMA_Initialize.
Parameters
Param | Description |
---|---|
channel | The DMA channel whose status needs to be checked. |
Returns
True - The channel is busy with an on-going transfer.
False - The channel is not busy and is available for a transfer.
Example
// Wait while the channel is busy.
while(DMA_ChannelIsBusy (DMA_CHANNEL_0));
Remarks
None.