|
#define | DMA_DISP_FIFO (4 << 27) |
| Auto-start DMA on display FIFO fill (8 pixels at a time)
|
|
#define | DMA_START_CARD (2 << 28) |
| Auto-start DMA on Slot-1 card transfer.
|
|
#define | DMA_START_CARD (5 << 27) |
| Auto-start DMA on Slot-1 card transfer.
|
|
#define | DMA_START_FIFO (7 << 27) |
| Auto-start DMA for 3D geometry FIFO queue.
|
|
#define | DMA_START_HBL (2 << 27) |
| Auto-start DMA on each visible scanline's horizontal blank.
|
|
#define | DMA_START_LINE (3 << 27) |
| Auto-start DMA on the beginning of each visible scanline.
|
|
#define | DMA_START_NOW 0 |
| Start DMA immediately.
|
|
#define | DMA_START_SLOT1 (2 << 28) |
| Auto-start DMA on Slot-1 card transfer.
|
|
#define | DMA_START_SLOT1 (5 << 27) |
| Auto-start DMA on Slot-1 card transfer.
|
|
#define | DMA_START_SLOT2 (3 << 28) |
| Auto-start DMA on Slot-2 interrupt request (DMA1/DMA3 only)
|
|
#define | DMA_START_SLOT2 (6 << 27) |
| Auto-start DMA on Slot-2 interrupt request (DMA1/DMA3 only)
|
|
#define | DMA_START_VBL (1 << 28) |
| Auto-start DMA on vertical blank.
|
|
#define | DMA_START_VBL (1 << 27) |
| Auto-start DMA on vertical blank.
|
|
#define | DMA_START_WIFI (3 << 28) |
| Auto-start DMA on NTR Wi-Fi interrupt request (DMA0/DMA2 only)
|
|
|
static int | dmaBusy (uint8_t channel) |
| Determines if the specified channel is busy.
|
|
static void | dmaCopy (const void *source, void *dest, uint32_t size) |
| Copies from source to destination using channel 3 of DMA available channels in half words.
|
|
static void | dmaCopyAsynch (const void *source, void *dest, uint32_t size) |
| Copies from source to destination using channel 3 of DMA available channels in half words.
|
|
static void | dmaCopyHalfWords (uint8_t channel, const void *src, void *dest, uint32_t size) |
| Copies from source to destination on one of the 4 available channels in half words.
|
|
static void | dmaCopyHalfWordsAsynch (uint8_t channel, const void *src, void *dest, uint32_t size) |
| Copies from source to destination on one of the 4 available channels in half words.
|
|
static void | dmaCopyWords (uint8_t channel, const void *src, void *dest, uint32_t size) |
| Copies from source to destination on one of the 4 available channels in words.
|
|
static void | dmaCopyWordsAsynch (uint8_t channel, const void *src, void *dest, uint32_t size) |
| Copies from source to destination on one of the 4 available channels in half words.
|
|
static void | dmaFillHalfWords (u16 value, void *dest, uint32_t size) |
| Fills the source with the supplied value using DMA channel 3.
|
|
static void | dmaFillWords (u32 value, void *dest, uint32_t size) |
| Fills the source with the supplied value using DMA channel 3.
|
|
void | dmaSetParams (uint8_t channel, const void *src, void *dest, uint32_t ctrl) |
| Starts a DMA transfer safely from ITCM.
|
|
void | dmaStopSafe (uint8_t channel) |
| Stops a DMA channel safely from ITCM.
|
|
Wrapper functions for direct memory access hardware.
The DS has 4 hardware direct memory access devices per CPU which can be used to transfer or fill chunks of memeory without CPU intervention. Using DMA is generaly faster than CPU copies (memcpy, swiCopy, for loops, etc..).
DMA has no access to data caches on the DS and as such will give unexpected results when DMAing data from main memory. The cache must be flushed as follows when using DMA to ensure proper opertion on the ARM9:
dmaCopy(source, destination,
sizeof(dataToCopy));
static void DC_FlushRange(const void *base, u32 size)
Flush the data cache of a range of addresses to memory.
Definition cache.h:51
static void dmaCopy(const void *source, void *dest, uint32_t size)
Copies from source to destination using channel 3 of DMA available channels in half words.
Definition dma.h:174
Very important note: Don't write to the DMA registers directly from the ARM9, it is unsafe. Enabling and disabling the DMA must not be done from code in main RAM, and special care is required to disable an enabled DMA channel. You should use dmaSetParams() and dmaStopSafe() instead.