1.27.28.8 XDMACn_ChannelSettingsGet Function

C

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

Summary

Returns the channel settings of a specific XDMAC Channel.

Description

This function returns the channel settings of the XDMAC channel.

This function can be used along with the XDMAC_ChannelSettingsSet to update any specific setting of the XDMAC channel.

Precondition

XDMAC should have been initialized by calling XDMACn_Initialize.

Parameters

Param Description
channel A specific XDMAC channel

Returns

Settings of a specific channel.

Example

//Update the transfer direction dynamically which was set to
//PER2MEM from within DMA manager to MEM2PER.
XDMAC_CHANNEL_CONFIG settings = 0;
settings = XDMAC_ChannelSettingsGet(XDMAC_CHANNEL_0);
settings = (settings & ~XDMAC_CC_DSYNC_Msk) | XDMAC_CC_DSYNC_MEM2PER;
XDMAC_ChannelSettingsSet(XDMAC_CHANNEL_0, settings);

Remarks

Use macro definitions from the packs header to compare with the settings.