Memory copy using UDMA.
More...
This API provides support for UDMA memory copy(DMACPY). The DMACPY allows memory copy between FC L1 memory and L2 memory.
Enumerator |
---|
PI_DMACPY_FC_L1_L2 |
Memcpy from FC_L1 to L2.
|
PI_DMACPY_L2_FC_L1 |
Memcpy from L2 to FC_L1.
|
PI_DMACPY_L2_L2 |
Memcpy from L2 to L2.
|
void pi_dmacpy_close |
( |
struct pi_device * |
device | ) |
|
This function closes a DMA Memcpy device.
- Parameters
-
device | Pointer to device structure. |
This function initializes DMA memcpy configuration struct with default values.
- Parameters
-
conf | Pointer to DMA Memcpy conf struct. |
int pi_dmacpy_copy |
( |
struct pi_device * |
device, |
|
|
void * |
src, |
|
|
void * |
dst, |
|
|
uint32_t |
size, |
|
|
pi_dmacpy_dir_e |
dir |
|
) |
| |
A memory copy is done from FC l1 memory or L2 memory and L2 memory, depending on memcpy direction.
- Parameters
-
device | Pointer to device structure. |
src | Pointer to source buffer. |
dst | Pointer to dest buffer. |
size | Size of data to copy. |
dir | Direction of memcpy. |
- Return values
-
0 | If operation is successfull. |
ERRNO | An error code otherwise. |
- Note
- Both src and dst buffers must be aligned on 4 bytes.
-
The size must be a multiple of 4 bytes.
int pi_dmacpy_copy_async |
( |
struct pi_device * |
device, |
|
|
void * |
src, |
|
|
void * |
dst, |
|
|
uint32_t |
size, |
|
|
pi_dmacpy_dir_e |
dir, |
|
|
struct pi_task * |
task |
|
) |
| |
A memory copy is done from FC l1 memory or L2 memory and L2 memory, depending on memcpy direction.
- Parameters
-
device | Pointer to device structure. |
src | Pointer to source buffer. |
dst | Pointer to dest buffer. |
size | Size of data to copy. |
dir | Direction of memcpy. |
task | Event task used to notify end of copy. |
- Return values
-
0 | If operation is successfull. |
ERRNO | An error code otherwise. |
- Note
- Both src and dst buffers must be aligned on 4 bytes.
-
The size must be a multiple of 4 bytes.
int pi_dmacpy_open |
( |
struct pi_device * |
device | ) |
|
This function opens a DMA Memcpy device. Once it is opened, user can do memory copy between FC memory and L2 memory.
- Parameters
-
device | Pointer to device structure. |
- Return values
-
0 | If operation is successfull. |
ERRNO | An error code otherwise. |
- Note
- This function must be called before any use of the device.