1.9.4.17 DMA_ChannelSettingsGet Function

C

DMA_CHANNEL_CONFIG DMA_ChannelSettingsGet ( DMA_CHANNEL channel );

Summary

Returns the current channel settings for the specified DMA Channel

Description

This function returns the current channel setting for the specified DMA channel. The application can use this function along with the DMA_ChannelSettingsSet function to analyze and if required change the transfer parameters of the DMA channel at run time.

Precondition

DMA should have been initialized by calling DMA_Initialize.

Parameters

Param Description
channel The DMA channel whose channel settings need to be obtained.

Returns

Value representing the current DMA channel setting.

Example

// Change the priority of DMA Channel 0
DMA_CHANNEL_CONFIG settings = 0;
settings = DMA_ChannelSettingsGet(DMA_CHANNEL_0);
settings = (settings & ~DMA_CHCTRLB_PRI_Msk) | DMA_CHCTRLB_PRI(DMA_CHCTRLB_PRI_PRI_2_Val);
DMA_ChannelSettingsSet(DMA_CHANNEL_0, settings);

Remarks

None.