Direct Memory Access

DMA (Direct Memory Access) transfers can be used to copy a block of memory from one location to another and/or to fill a block of memory with a given value in hardware. All DMA function in HEL Library use the general purpose channel (channel 3). More...

Functions


Detailed Description

DMA (Direct Memory Access) transfers can be used to copy a block of memory from one location to another and/or to fill a block of memory with a given value in hardware. All DMA function in HEL Library use the general purpose channel (channel 3).


Function Documentation

void hel_DmaCopy16 ( void *  pDest,
const void *  pSrc,
u32  SizeIn16BitWords 
)

Copy memory using DMA Channel 3 in 16BIT mode.

The hel_DmaCopy16 function copies a block of memory from one location to another using DMA Channel 3 in 16BIT mode.

Parameters:
[in] pDest Pointer to copy destination
[in] pSrc Pointer to block to copy
[in] SizeIn16BitWords Size 16BIT Words of block to copy
See also:
hel_DmaCopy32

void hel_DmaCopy32 ( void *  pDest,
const void *  pSrc,
u32  SizeIn32BitWords 
)

Copy memory using DMA Channel 3 in 32BIT mode.

The hel_DmaCopy32 function copies a block of memory from one location to another using DMA Channel 3 in 32BIT mode.

Parameters:
[in] pDest Pointer to copy destination
[in] pSrc Pointer to block to copy
[in] SizeIn32BitWords Size 32BIT Words of block to copy
See also:
hel_DmaCopy16

void hel_DmaSet16 ( void *  pDest,
volatile u16  SrcValue,
u32  SizeIn16BitWords 
)

Fills a block of memory with a specified value using Channel 3 in 16BIT mode.

The hel_DmaSet16 function fills a block of memory with a specified value using DMA Channel 3 in 16bit mode.

Parameters:
[in] pDest Pointer to block to fill
[in] SrcValue The 16bit value with which to fill
[in] SizeIn16BitWords Size in 16bit words of block to fill
Note:
The destination address specified by pDest must be multiply 2.
See also:
hel_DmaSet8, hel_DmaSet32

void hel_DmaSet32 ( void *  pDest,
volatile u32  SrcValue,
u32  SizeIn32BitWords 
)

Fills a block of memory with a specified value using Channel 3 in 32BIT mode.

The hel_DmaSet32 function fills a block of memory with a specified value using DMA Channel 3 in 32bit mode.

Parameters:
[in] pDest Pointer to block to fill
[in] SrcValue The 32bit value with which to fill
[in] SizeIn32BitWords Size in 32bit words of block to fill
Note:
The destination address specified by pDest must be multiply 4.
See also:
hel_DmaSet8, hel_DmaSet16

void hel_DmaSet8 ( void *  pDest,
u8  SrcValue,
u32  SizeInBytes 
)

Fills a block of memory with a specified value using DMA Channel 3.

The hel_DmaSet8 function fills a block of memory with a specified value using DMA Channel 3.

Parameters:
[in] pDest Pointer to block to fill
[in] SrcValue The byte value with which to fill
[in] SizeInBytes Size in bytes of block to fill
Note:
The Game Boy Advance hardware does not provide support to perform 8bit DMA transfers in hardware. The hel_DmaSet8 functions emulates this by using the 16bit mode and writes the first and/or last byte in software. Because some memory alignment checks have to be done, before actually starting the DMA transfer, this function is kinda slower than a pure 16bit transfer due to the setup code.
See also:
hel_DmaSet16, hel_DmaSet32

void hel_DmaZeroMemory ( void *  pDest,
u32  SizeInBytes 
)

Fills a block of memory with zeros using DMA Channel 3.

The hel_DmaZeroMemory function fills a block of memory with zeros using DMA Channel 3.

Parameters:
[in] pDest Pointer to block to fill with zeros
[in] SizeInBytes Size in bytes of block to fill with zeros
Note:
This function uses hel_DmaSet8 to zeroise a block of memory. Zeroising a block of memory, using Direct Memory Access, which is only a few bytes in size brings no advantage though.
See also:
hel_DmaSet8


Generated on Fri Aug 17 12:12:38 2007 for HEL Library by  doxygen 1.5.3