Wrapper functions for direct memory access hardware. [詳細]
#include "nds/ndstypes.h"
マクロ定義 | |
#define | DMA0_SRC (*(vuint32*)0x040000B0) |
#define | DMA0_DEST (*(vuint32*)0x040000B4) |
#define | DMA0_CR (*(vuint32*)0x040000B8) |
#define | DMA1_SRC (*(vuint32*)0x040000BC) |
#define | DMA1_DEST (*(vuint32*)0x040000C0) |
#define | DMA1_CR (*(vuint32*)0x040000C4) |
#define | DMA2_SRC (*(vuint32*)0x040000C8) |
#define | DMA2_DEST (*(vuint32*)0x040000CC) |
#define | DMA2_CR (*(vuint32*)0x040000D0) |
#define | DMA3_SRC (*(vuint32*)0x040000D4) |
#define | DMA3_DEST (*(vuint32*)0x040000D8) |
#define | DMA3_CR (*(vuint32*)0x040000DC) |
#define | DMA_SRC(n) (*(vuint32*)(0x040000B0+(n*12))) |
#define | DMA_DEST(n) (*(vuint32*)(0x040000B4+(n*12))) |
#define | DMA_CR(n) (*(vuint32*)(0x040000B8+(n*12))) |
#define | DMA_ENABLE BIT(31) |
#define | DMA_BUSY BIT(31) |
#define | DMA_IRQ_REQ BIT(30) |
#define | DMA_START_NOW 0 |
#define | DMA_START_CARD (5<<27) |
#define | DMA_16_BIT 0 |
#define | DMA_32_BIT BIT(26) |
#define | DMA_REPEAT BIT(25) |
#define | DMA_SRC_INC (0) |
#define | DMA_SRC_DEC BIT(23) |
#define | DMA_SRC_FIX BIT(24) |
#define | DMA_DST_INC (0) |
#define | DMA_DST_DEC BIT(21) |
#define | DMA_DST_FIX BIT(22) |
#define | DMA_DST_RESET (3<<21) |
#define | DMA_COPY_WORDS (DMA_ENABLE | DMA_32_BIT | DMA_START_NOW) |
#define | DMA_COPY_HALFWORDS (DMA_ENABLE | DMA_16_BIT | DMA_START_NOW) |
#define | DMA_FIFO (DMA_ENABLE | DMA_32_BIT | DMA_DST_FIX | DMA_START_FIFO) |
関数 | |
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 | 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 | dmaCopy (const void *source, void *dest, uint32 size) |
copies from source to destination using channel 3 of DMA available channels in half 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 | 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 | 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 | dmaFillWords (u32 value, void *dest, uint32 size) |
fills the source with the supplied value using DMA channel 3 | |
void | dmaFillHalfWords (u16 value, void *dest, uint32 size) |
fills the source with the supplied value using DMA channel 3 | |
int | dmaBusy (uint8 channel) |
determines if the specified channel is busy |
Wrapper functions for direct memory access hardware.
DC_FlushRange(source, sizeof(dataToCopy)); dmaCopy(source, destination, sizeof(dataToCopy));
static dmaBusy | ( | uint8 | channel | ) | [inline] |
determines if the specified channel is busy
channel | the dma channel to check (0 - 3). |
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
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) |
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.
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
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.
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
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.
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] |
fills the source with the supplied value using DMA channel 3
value | the 16 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 half word (2 bytes) |
static void dmaFillWords | ( | u32 | value, | |
void * | dest, | |||
uint32 | size | |||
) | [inline] |
fills the source with the supplied value using DMA channel 3
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) |