1.2.5.11 1.9.4.11 DMA_ChannelPatternMatchSetup Function

C

void DMA_ChannelPatternMatchSetup ( DMA_CHANNEL channel, DMA_PATTERN_MATCH_LEN patternLen, uint16_t matchData )

Summary

This API is used to setup DMA pattern matching.

Description

This API is used to setup DMA pattern matching. It configures the pattern match data and pattern match length. If the pattern match length is DMA_PATTERN_MATCH_LEN_2BYTE, then matchData is 16-bit. If the pattern match length is DMA_PATTERN_MATCH_LEN_1BYTE, then the matchData is 8-bit. This API also enables pattern matching. When a pattern match occurs the transfer is aborted.

Precondition

DMA should have been initialized by calling DMA_Initialize.

Parameters

Param Description
channel DMA channel
patternLen Length of the pattern match data. The value can either be DMA_PATTERN_MATCH_LEN_1BYTE or DMA_PATTERN_MATCH_LEN_2BYTE
matchData Pattern match data. 8-bit or 16-bit depending on the value of patternLen.

Returns

None

Example

DMA_ChannelPatternMatchSetup(DMA_CHANNEL_0, DMA_PATTERN_MATCH_LEN_1BYTE, 0x0d);

Remarks

None.