1.25.26.5 1.26.23.5 1.27.28.5 1.28.28.5 1.34.29.5 1.41.24.5 1.42.23.5 XDMACn_ChannelIsBusy Function

C

// n is instance of the peripheral and it is applicable only for devices having multiple instances of the peripheral.
bool XDMACn_ChannelIsBusy (XDMAC_CHANNEL channel)

Summary

Returns the busy status of a specific XDMAC Channel.

Description

This function returns the busy status of the XDMAC channel. XDMAC channel will be busy if any transfer is in progress.

This function can be used to check the status of the channel prior to submitting a transfer request. And this can also be used to check the status of the submitted request if callback mechanism is not preferred.

Precondition

XDMAC should have been initialized by calling XDMACn_Initialize.

Parameters

Param Description
channel A specific XDMAC channel

Returns

Busy status of the specific channel. - True - Channel is busy

- False - Channel is free

Example

// Transfer 10 bytes of data to UART TX using XDMAC channel 1
MY_APP_OBJ myAppObj;
uint8_t buf[10] = {0,1,2,3,4,5,6,7,8,9};
    void *srcAddr = (uint8_t *) buf;
    void *destAddr = (uin8_t*) &U1TXREG;
    size_t size = 10;
    
    if(false == XDMAC_ChannelIsBusy(XDMAC_CHANNEL_1))
    {
        XDMAC_ChannelTransfer(XDMAC_CHANNEL_1, srcAddr, destAddr, size);
    }

Remarks

None.