1.40.6.12 DMAC_ChannelSettingsGet Function

C

DMAC_CHANNEL_CONFIG DMAC_ChannelSettingsGet ( DMAC_CHANNEL channel );

Summary

Returns the current channel settings for the specified DMAC Channel

Description

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

Precondition

DMAC should have been initialized by calling DMAC_Initialize.

Parameters

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

Returns

Value representing the current DMAC channel setting.

Example

// Change the beat size of DMAC Channel 0
DMAC_CHANNEL_CONFIG settings = 0;
settings = DMAC_ChannelSettingsGet(DMAC_CHANNEL_0);
settings = (settings & ~DMAC_DESCRIPTOR_BTCTRL_BEATSIZE_Msk) | DMAC_DESCRIPTOR_BTCTRL_BEATSIZE_HWORD;
DMAC_ChannelSettingsSet(DMAC_CHANNEL_0, settings);

Remarks

None.