Functions
Functions
Peripheral Driver » APP DRIVER » DMA | Peripheral Driver » APP DRIVER » UART

## Functions
dma_id_t | app_dma_init (app_dma_params_t *p_params, app_dma_evt_handler_t evt_handler)
| Initialize the APP DMA DRIVER according to the specified parameters in the app_dma_params_t and app_dma_evt_handler_t. More...
uint16_t | app_dma_deinit (dma_id_t ins_id)
| De-initialize the APP ADC DRIVER peripheral. More...
uint16_t | app_dma_start (dma_id_t id, uint32_t src_address, uint32_t dst_address, uint32_t data_length)
| Start the DMA Transfer. More...
dma_handle_t * | app_dma_get_handle (dma_id_t id)
| Return the DMA handle. More...
uint16_t | app_uart_dma_init (app_uart_params_t *p_params)
| Initialize dma mode of the APP UART DRIVER according to the specified parameters in the app_uart_params_t. More...
uint16_t | app_uart_dma_deinit (app_uart_id_t id)
| De-initialize dma mode of the APP UART peripheral. More...
uint16_t | app_uart_dma_receive_async (app_uart_id_t id, uint8_t *p_data, uint16_t size)
| Receive an amount of data in dma mode. More...
uint16_t | app_uart_dma_transmit_async (app_uart_id_t id, uint8_t *p_data, uint16_t size)
| Send an amount of data in dma mode. More...

## Detailed Description

## Function Documentation

## ◆ app_dma_deinit()

uint16_t app_dma_deinit | ( | dma_id_t | ins_id | ) |

De-initialize the APP ADC DRIVER peripheral.

Parameters

  [in] | ins_id | Deinitialize DMA channel for a specific ID.

Returns
  Result of De-initialization.

## ◆ app_dma_get_handle()

dma_handle_t* app_dma_get_handle | ( | dma_id_t | id | ) |

Return the DMA handle.

Parameters

  [in] | id | DMA Channel ID.

Returns
  Pointer to the specified ID's DMA handle.

## ◆ app_dma_init()

dma_id_t app_dma_init | ( | app_dma_params_t * | p_params,
|  | app_dma_evt_handler_t | evt_handler
| ) |  |

Initialize the APP DMA DRIVER according to the specified parameters in the app_dma_params_t and app_dma_evt_handler_t.

Parameters

  [in] | p_params | Pointer to app_dma_params_t parameter which contains the configuration information for the specified DMA module.
  [in] | evt_handler | DMA user callback function.

Returns
  DMA ID

## ◆ app_dma_start()

uint16_t app_dma_start | ( | dma_id_t | id,
|  | uint32_t | src_address,
|  | uint32_t | dst_address,
|  | uint32_t | data_length
| ) |  |

Start the DMA Transfer.

Parameters

  [in] | id | DMA channel id.
  [in] | src_address | The source memory Buffer address
  [in] | dst_address | The destination memory Buffer address
  [in] | data_length | The length of data to be transferred from source to destination, ranging between 0 and 4095.

## ◆ app_uart_dma_deinit()

uint16_t app_uart_dma_deinit | ( | app_uart_id_t | id | ) |

De-initialize dma mode of the APP UART peripheral.

Parameters

  [in] | id | De-initialize for a specific ID.

Returns
  Result of De-initialization.

## ◆ app_uart_dma_init()

uint16_t app_uart_dma_init | ( | app_uart_params_t * | p_params | ) |

Initialize dma mode of the APP UART DRIVER according to the specified parameters in the app_uart_params_t.

Parameters

  [in] | p_params | Pointer to app_uart_params_t parameter which contains the configuration information for the specified UART module.

Returns
  Result of initialization.

## ◆ app_uart_dma_receive_async()

uint16_t app_uart_dma_receive_async | ( | app_uart_id_t | id,
|  | uint8_t * | p_data,
|  | uint16_t | size
| ) |  |

Receive an amount of data in dma mode.

Parameters

  [in] | id | which UART module want to receive.
  [in] | p_data | Pointer to data buffer.
  [in] | size | Amount of data to receive.

Returns
  Result of operation.

## ◆ app_uart_dma_transmit_async()

uint16_t app_uart_dma_transmit_async | ( | app_uart_id_t | id,
|  | uint8_t * | p_data,
|  | uint16_t | size
| ) |  |

Send an amount of data in dma mode.

Parameters

  [in] | id | which UART module want to send.
  [in] | p_data | Pointer to data buffer.
  [in] | size | Amount of data to be sent.

Returns
  Result of operation.