1 /**
2 ******************************************************************************
3 * File Name : dma.c
4 * Description : This file provides code for the configuration
5 * of all the requested memory to memory DMA transfers.
6 ******************************************************************************
7 * @attention
8 *
9 * <h2><center>© Copyright (c) 2019 STMicroelectronics.
10 * All rights reserved.</center></h2>
11 *
12 * This software component is licensed by ST under BSD 3-Clause license,
13 * the "License"; You may not use this file except in compliance with the
14 * License. You may obtain a copy of the License at:
15 * opensource.org/licenses/BSD-3-Clause
16 *
17 ******************************************************************************
18 */
19 /* Includes ------------------------------------------------------------------*/
20 #include "dma.h"
21
22 /* USER CODE BEGIN 0 */
23
24 /* USER CODE END 0 */
25
26 /*----------------------------------------------------------------------------*/
27 /* Configure DMA */
28 /*----------------------------------------------------------------------------*/
29
30 /* USER CODE BEGIN 1 */
31
32 /* USER CODE END 1 */
33
34 /**
35 * Enable DMA controller clock
36 */
MX_DMA_Init(void)37 void MX_DMA_Init(void)
38 {
39 /* DMA controller clock enable */
40 __HAL_RCC_DMA1_CLK_ENABLE();
41
42 /* DMA interrupt init */
43 /* DMA1_Stream1_IRQn interrupt configuration */
44 HAL_NVIC_SetPriority(DMA1_Stream1_IRQn, 0, 0);
45 HAL_NVIC_EnableIRQ(DMA1_Stream1_IRQn);
46 /* DMA1_Stream4_IRQn interrupt configuration */
47 HAL_NVIC_SetPriority(DMA1_Stream4_IRQn, 0, 0);
48 HAL_NVIC_EnableIRQ(DMA1_Stream4_IRQn);
49
50 }
51
52 /* USER CODE BEGIN 2 */
53
54 /* USER CODE END 2 */
55
56 /**
57 * @}
58 */
59
60 /**
61 * @}
62 */
63
64 /************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/
65