SDK4.0 This document shows Ameba SDK 4.0 APIs

- Main Page
- Modules
- Data Structures
- Files

DMA
Ameba SDK » HAL

dma functions More...

## Ameba Common
typedef struct gdma_s | gdma_t
typedef void(* | dma_irq_handler) (uint32_t id)
void | dma_memcpy_init (gdma_t *dma_obj, dma_irq_handler handler, uint32_t id)
| Initial the GDMA. More...
void | dma_memcpy_deinit (gdma_t *dma_obj)
| De-Initial the GDMA. More...
void | dma_memcpy (gdma_t *dma_obj, void *dst, void *src, uint32_t len)
| To do a memory copy by DMA. More...

## Ameba1 Only
void | dma_memcpy_aggr_init (gdma_t *dma_obj, dma_irq_handler handler, uint32_t id)
| Initial the GDMA. More...
void | dma_memcpy_aggr (gdma_t *dma_obj, PHAL_GDMA_BLOCK block_info)

## Detailed Description

dma functions

## Function Documentation

void dma_memcpy | ( | gdma_t * | dma_obj,
|  | void * | dst,
|  | void * | src,
|  | uint32_t | len
| ) |  |

To do a memory copy by DMA.

Parameters

  dma_obj | the GDMA object
  dst | destination memory address
  src | source memory address
  len | copy data length

Return values

  None |

void dma_memcpy_aggr_init | ( | gdma_t * | dma_obj,
|  | dma_irq_handler | handler,
|  | uint32_t | id
| ) |  |

Initial the GDMA.

Parameters

  dma_obj | the GDMA object
  handler | the callback function for a DMA transfer complete.
  id | the argument of the callback function.

Return values

  None |

void dma_memcpy_deinit | ( | gdma_t * | dma_obj | ) |

De-Initial the GDMA.

Parameters

  dma_obj | the GDMA object

Return values

  None |

void dma_memcpy_init | ( | gdma_t * | dma_obj,
|  | dma_irq_handler | handler,
|  | uint32_t | id
| ) |  |

Initial the GDMA.

Parameters

  dma_obj | the GDMA object
  handler | the callback function for a DMA transfer complete.
  id | the argument of the callback function.

Return values

  None |