dma.c 1.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061
  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>&copy; Copyright (c) 2020 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. /* USER CODE BEGIN 0 */
  22. /* USER CODE END 0 */
  23. /*----------------------------------------------------------------------------*/
  24. /* Configure DMA */
  25. /*----------------------------------------------------------------------------*/
  26. /* USER CODE BEGIN 1 */
  27. /* USER CODE END 1 */
  28. /**
  29. * Enable DMA controller clock
  30. */
  31. void MX_DMA_Init(void)
  32. {
  33. /* DMA controller clock enable */
  34. __HAL_RCC_DMA2_CLK_ENABLE();
  35. /* DMA interrupt init */
  36. /* DMA2_Stream0_IRQn interrupt configuration */
  37. HAL_NVIC_SetPriority(DMA2_Stream0_IRQn, 0, 0);
  38. HAL_NVIC_EnableIRQ(DMA2_Stream0_IRQn);
  39. }
  40. /* USER CODE BEGIN 2 */
  41. /* USER CODE END 2 */
  42. /**
  43. * @}
  44. */
  45. /**
  46. * @}
  47. */
  48. /************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/