adc

Dependents:   h7adc

Committer:
yuliyasm
Date:
Wed Oct 28 15:35:08 2020 +0000
Revision:
3:1d62b3be52e8
new

Who changed what in which revision?

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