#include <nitro/mi.h>
void MI_VBlankDmaCopy32( u32 dmaNo, const void* src, void* dest, u32 size );
void MI_VBlankDmaCopy16( u32 dmaNo, const void* src, void* dest, u32 size );
void MI_VBlankDmaCopy32Async( u32 dmaNo, const void* src, void* dest, u32 size,
MIDmaCallback callback, void* arg );
void MI_VBlankDmaCopy16Async( u32 dmaNo, const void* src, void* dest, u32 size,
MIDmaCallback callback, void* arg );
This function uses DMA to copy a V-Blank. When a V-Blank starts, DMA starts.
MI_VBlankDmaCopy16() and MI_VBlankDmaCopy16Async() copy in units of 16 bits. The transfer source and transfer destination addresses must be 2-byte aligned.
MI_VBlankDmaCopy32() and MI_VBlankDmaCopy32Async() copy in units of 32 bits. The transfer source address and transfer destination address must be 4-byte aligned.
MI_VBlankDmaCopy16() and MI_VBlankDmaCopy32() start DMA and end it when a V-blank is generated.
MI_VBlankDmaCopy16Async() and MI_VBlankDmaCopy32Async() start DMA when a V-blank is generated and call a callback when ending DMA. The callback is the MIDmaCallback type (a void-type function that takes one void* argument).
To fully exploit the features of an Async-type API, you must understand how to use it.
Uses the following IO registers:
dmaNo |
DMA channel used |
src |
Transfer source address |
dest |
Transfer destination address |
size |
Transfer size |
callback |
Callback when ending DMA |
arg |
Callback argument when ending DMA |
None.
10/18/2004 Added 2 arguments and expanded the C Spec and Description.
12/01/2003 Initial version.