Format
#include "sgl.h"
void *src_A;
void *dest_A;
Uint32 size;
Uint16 mode;
void slDMAXCopy( src_A, dest_A, size, mode );
argument
void *src_A - Address where the original data is located.
void *dest_A - Destination address.
Uint32 size - Size to transfer (in transfer size units).
Uint16 mode - Transfer mode (described later).
Return number
void - returns nothing.
function
-
Block transfers are performed using the CPU's built-in DMA.
The arguments are the same as slDMACopy above, but mode is specified as follows.
mode:
In the format SourceMode_DestinationMode_Size,
SourceMode :
Sinc: Transfer while incrementing the source address.
Sdec: Transfer while decreasing the source address.
Sfix: Transfers with a fixed source address.
DestinationMode:
Dinc: Transfer while increasing the destination address.
Ddec: Transfer while decreasing the destination address.
Dfix: Transfer with a fixed destination address.
Size :
Byte: Transfer 1 byte at a time.
Word: Transfer every 2 bytes.
Long: Transfer every 4 bytes.
example
Fill an area with 0.
Uint32 dest = 0;
slDMAXCopy ( src, &dest, size, Sfix_Dinc_Long );
Note
-
Address changes are executed every time a transfer unit ends, so if you specify subtraction,
Please note that the transfer will first be forwarded to the specified destination, the address will be reduced, and then the next transfer will be made.
reference
-