Yuliya Smirnova / ADE7912

Dependents:   h7adc

Embed: (wiki syntax)

« Back to documentation index

Show/hide line numbers dma.cpp Source File

dma.cpp

00001 /**
00002   ******************************************************************************
00003   * File Name          : dma.c
00004   * Description        : This file provides code for the configuration
00005   *                      of all the requested memory to memory DMA transfers.
00006   ******************************************************************************
00007   * @attention
00008   *
00009   * <h2><center>&copy; Copyright (c) 2020 STMicroelectronics.
00010   * All rights reserved.</center></h2>
00011   *
00012   * This software component is licensed by ST under Ultimate Liberty license
00013   * SLA0044, the "License"; You may not use this file except in compliance with
00014   * the License. You may obtain a copy of the License at:
00015   *                             www.st.com/SLA0044
00016   *
00017   ******************************************************************************
00018   */
00019 
00020 /* Includes ------------------------------------------------------------------*/
00021 #include "dma.h"
00022 
00023 /* USER CODE BEGIN 0 */
00024 
00025 /* USER CODE END 0 */
00026 
00027 /*----------------------------------------------------------------------------*/
00028 /* Configure DMA                                                              */
00029 /*----------------------------------------------------------------------------*/
00030 
00031 /* USER CODE BEGIN 1 */
00032 
00033 /* USER CODE END 1 */
00034 
00035 /**
00036   * Enable DMA controller clock
00037   */
00038 void MX_DMA_Init(void)
00039 {
00040 
00041   /* DMA controller clock enable */
00042   __HAL_RCC_DMA1_CLK_ENABLE();
00043 
00044   /* DMA interrupt init */
00045   /* DMA1_Stream0_IRQn interrupt configuration */
00046   HAL_NVIC_SetPriority(DMA1_Stream0_IRQn, 0, 0);
00047   HAL_NVIC_EnableIRQ(DMA1_Stream0_IRQn);
00048   /* DMA1_Stream1_IRQn interrupt configuration */
00049   HAL_NVIC_SetPriority(DMA1_Stream1_IRQn, 0, 0);
00050   HAL_NVIC_EnableIRQ(DMA1_Stream1_IRQn);
00051   /* DMA1_Stream2_IRQn interrupt configuration */
00052   HAL_NVIC_SetPriority(DMA1_Stream2_IRQn, 0, 0);
00053   HAL_NVIC_EnableIRQ(DMA1_Stream2_IRQn);
00054   /* DMA1_Stream3_IRQn interrupt configuration */
00055   HAL_NVIC_SetPriority(DMA1_Stream3_IRQn, 0, 0);
00056   HAL_NVIC_EnableIRQ(DMA1_Stream3_IRQn);
00057 
00058 }
00059 
00060 /* USER CODE BEGIN 2 */
00061 
00062 /* USER CODE END 2 */
00063 
00064 /**
00065   * @}
00066   */
00067 
00068 /**
00069   * @}
00070   */
00071 
00072 /************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/
00073