dma.h File Reference
Wrapper functions for direct memory access hardware.
More...
#include "nds/ndstypes.h"
Functions |
int | dmaBusy (uint8 channel) |
| determines if the specified channel is busy
|
void | dmaCopy (const void *source, void *dest, uint32 size) |
| copies from source to destination using channel 3 of DMA available channels in half words
|
void | dmaCopyAsynch (const void *source, void *dest, uint32 size) |
| copies from source to destination using channel 3 of DMA available channels in half words. This function returns immediately after starting the transfer.
|
void | dmaCopyHalfWords (uint8 channel, const void *src, void *dest, uint32 size) |
| copies from source to destination on one of the 4 available channels in half words
|
void | dmaCopyHalfWordsAsynch (uint8 channel, const void *src, void *dest, uint32 size) |
| copies from source to destination on one of the 4 available channels in half words. This function returns immediately after starting the transfer.
|
void | dmaCopyWords (uint8 channel, const void *src, void *dest, uint32 size) |
| copies from source to destination on one of the 4 available channels in words
|
void | dmaCopyWordsAsynch (uint8 channel, const void *src, void *dest, uint32 size) |
| copies from source to destination on one of the 4 available channels in half words. This function returns immediately after starting the transfer.
|
void | dmaFillHalfWords (u16 value, void *dest, uint32 size) |
| fills the source with the supplied value using DMA channel 3
|
void | dmaFillWords (u32 value, void *dest, uint32 size) |
| fills the source with the supplied value using DMA channel 3
|
Detailed Description
Wrapper functions for direct memory access hardware.
Function Documentation
static dmaBusy |
( |
uint8 |
channel |
) |
[inline] |
determines if the specified channel is busy
- Parameters:
-
| channel | the dma channel to check (0 - 3). |
- Returns:
- non zero if busy, 0 if channel is free
static void dmaCopy |
( |
const void * |
source, |
|
|
void * |
dest, |
|
|
uint32 |
size | |
|
) |
| | [inline] |
copies from source to destination using channel 3 of DMA available channels in half words
- Parameters:
-
| source | the source to copy from |
| dest | the destination to copy to |
| size | the size in bytes of the data to copy. Will be truncated to the nearest half word (2 bytes) |
- Examples:
- audio/maxmod/song_events_example/source/template.c, audio/micrecord/source/micrecord.c, capture/ScreenShot/source/main.cpp, capture/ScreenShot/source/screenshot.cpp, Graphics/Backgrounds/256_color_bmp/source/main.cpp, Graphics/Backgrounds/all_in_one/source/advanced.cpp, Graphics/Backgrounds/all_in_one/source/basic.cpp, Graphics/Backgrounds/all_in_one/source/handmade.cpp, Graphics/Backgrounds/all_in_one/source/scrolling.cpp, Graphics/Backgrounds/rotation/source/main.cpp, and Graphics/Sprites/animate_simple/source/template.c.
static void dmaCopyAsynch |
( |
const void * |
src, |
|
|
void * |
dest, |
|
|
uint32 |
size | |
|
) |
| | [inline] |
copies from source to destination using channel 3 of DMA available channels in half words. This function returns immediately after starting the transfer.
- Parameters:
-
| src | the source to copy from |
| dest | the destination to copy to |
| size | the size in bytes of the data to copy. Will be truncated to the nearest half word (2 bytes) |
static void dmaCopyHalfWords |
( |
uint8 |
channel, |
|
|
const void * |
src, |
|
|
void * |
dest, |
|
|
uint32 |
size | |
|
) |
| | [inline] |
copies from source to destination on one of the 4 available channels in half words
- Parameters:
-
| channel | the dma channel to use (0 - 3). |
| src | the source to copy from |
| dest | the destination to copy to |
| size | the size in bytes of the data to copy. Will be truncated to the nearest half word (2 bytes) |
static void dmaCopyHalfWordsAsynch |
( |
uint8 |
channel, |
|
|
const void * |
src, |
|
|
void * |
dest, |
|
|
uint32 |
size | |
|
) |
| | [inline] |
copies from source to destination on one of the 4 available channels in half words. This function returns immediately after starting the transfer.
- Parameters:
-
| channel | the dma channel to use (0 - 3). |
| src | the source to copy from |
| dest | the destination to copy to |
| size | the size in bytes of the data to copy. Will be truncated to the nearest half word (2 bytes) |
static void dmaCopyWords |
( |
uint8 |
channel, |
|
|
const void * |
src, |
|
|
void * |
dest, |
|
|
uint32 |
size | |
|
) |
| | [inline] |
copies from source to destination on one of the 4 available channels in words
- Parameters:
-
| channel | the dma channel to use (0 - 3). |
| src | the source to copy from |
| dest | the destination to copy to |
| size | the size in bytes of the data to copy. Will be truncated to the nearest word (4 bytes) |
static void dmaCopyWordsAsynch |
( |
uint8 |
channel, |
|
|
const void * |
src, |
|
|
void * |
dest, |
|
|
uint32 |
size | |
|
) |
| | [inline] |
copies from source to destination on one of the 4 available channels in half words. This function returns immediately after starting the transfer.
- Parameters:
-
| channel | the dma channel to use (0 - 3). |
| src | the source to copy from |
| dest | the destination to copy to |
| size | the size in bytes of the data to copy. Will be truncated to the nearest word (4 bytes) |
static void dmaFillHalfWords |
( |
u16 |
value, |
|
|
void * |
dest, |
|
|
uint32 |
size | |
|
) |
| | [inline] |
static void dmaFillWords |
( |
u32 |
value, |
|
|
void * |
dest, |
|
|
uint32 |
size | |
|
) |
| | [inline] |
fills the source with the supplied value using DMA channel 3
- Parameters:
-
| value | the 32 byte value to fill memory with |
| dest | the destination to copy to |
| size | the size in bytes of the area to fill. Will be truncated to the nearest word (4 bytes) |