MI_DmaClear*

Syntax

#include <nitro/mi.h>

void MI_DmaClear32( u32 dmaNo,
void* dest,
u32 size );


void MI_DmaClear32_SetUp( u32 dmaNo,
void* dest,
u32 size );


void MI_DmaClear16( u32 dmaNo,
void* dest,
u32 size );


void MI_DmaClear16_SetUp( u32 dmaNo,
void* dest,
u32 size );


void MI_DmaClear32Async( u32 dmaNo,
void* dest,
u32 size,
MIDmaCallback callback,
void* arg );


void MI_DmaClear32Async_SetUp( u32 dmaNo,
void* dest,
u32 size,
MIDmaCallback callback,
void* arg );


void MI_DmaClear16Async( u32 dmaNo,
void* dest,
u32 size,
MIDmaCallback callback,
void* arg );


void MI_DmaClear16Async_SetUp( u32 dmaNo,
void* dest,
u32 size,
MIDmaCallback callback,
void* arg );

Arguments

dmaNo DMA channel used.
dest The address of the clear destination
size Clear size
callback Callback when DMA ends.
arg Callback argument when DMA ends.

Return Values

None.

Description

Uses DMA to zero-clear memory.

The *_SetUp functions only configure the given settings without actually performing DMA. To actually start DMA, call the MI_DmaRestart function.

MI_DmaClear16() and MI_DmaClear16Async() fill memory with zeros in 16-bit units. You must 2-byte align the clear destination address. MI_DmaClear32() and MI_DmaClear32Async() fill memory with zeros in 32-bit units. The clear destination address must be 4-byte aligned.

MI_DmaClear16() and MI_DmaClear32() wait within the function until DMA completes. MI_DmaClear16Async() and MI_DmaClear32Async() call a callback function when DMA ends. The callback, callback, is a MIDmaCallback type (a void type function which takes one void* argument). callback is called from the system DMA interrupt handler and therefore is called while interrupts are prohibited.

Internal Operation

Calls the MI_DmaFill* function.

See Also

MI_CpuClear*
MI_DmaCopy*
MI_DmaFill*
MI_DmaRestart
MI_DmaSend*

Revision History

2007/10/31 Added the _SetUp functions.
2005/03/08 Standardized the Japanese term for "interrupt." 2004/12/22 Added a description regarding callback. 2003/12/01 Initial version.


CONFIDENTIAL