38
|
1 /**
|
|
2 ******************************************************************************
|
|
3 * File Name : dma.c
|
|
4 * Date : 16/09/2014 16:10:20
|
|
5 * Description : This file provides code for the configuration
|
|
6 * of all the requested memory to memory DMA transfers.
|
|
7 ******************************************************************************
|
|
8 *
|
|
9 * COPYRIGHT(c) 2014 STMicroelectronics
|
|
10 *
|
|
11 * Redistribution and use in source and binary forms, with or without modification,
|
|
12 * are permitted provided that the following conditions are met:
|
|
13 * 1. Redistributions of source code must retain the above copyright notice,
|
|
14 * this list of conditions and the following disclaimer.
|
|
15 * 2. Redistributions in binary form must reproduce the above copyright notice,
|
|
16 * this list of conditions and the following disclaimer in the documentation
|
|
17 * and/or other materials provided with the distribution.
|
|
18 * 3. Neither the name of STMicroelectronics nor the names of its contributors
|
|
19 * may be used to endorse or promote products derived from this software
|
|
20 * without specific prior written permission.
|
|
21 *
|
|
22 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
|
|
23 * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
|
24 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
|
25 * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
|
|
26 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
|
27 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
|
|
28 * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
|
|
29 * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
|
|
30 * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
|
31 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|
32 *
|
|
33 ******************************************************************************
|
|
34 */
|
|
35 /* Includes ------------------------------------------------------------------*/
|
|
36 #include "dma.h"
|
662
|
37 #include "uart.h"
|
38
|
38
|
|
39 /* USER CODE BEGIN 0 */
|
|
40
|
|
41 /* USER CODE END 0 */
|
|
42
|
|
43 /*----------------------------------------------------------------------------*/
|
|
44 /* Configure DMA */
|
|
45 /*----------------------------------------------------------------------------*/
|
|
46
|
|
47 /* USER CODE BEGIN 1 */
|
|
48
|
|
49 /* USER CODE END 1 */
|
|
50
|
|
51 /**
|
|
52 * Enable DMA controller clock
|
|
53 */
|
|
54 void MX_DMA_Init(void)
|
|
55 {
|
|
56 /* DMA controller clock enable */
|
|
57 __DMA2_CLK_ENABLE();
|
|
58
|
662
|
59 MX_USART1_DMA_Init();
|
38
|
60 /* DMA interrupt init */
|
|
61
|
|
62 }
|
|
63
|
|
64 void MX_DMA_DeInit(void)
|
|
65 {
|
|
66 /* DMA controller clock enable */
|
|
67 __DMA2_CLK_DISABLE();
|
|
68
|
|
69 /* DMA interrupt init */
|
|
70
|
|
71 }
|
|
72
|
|
73 /* USER CODE BEGIN 2 */
|
|
74
|
|
75 /* USER CODE END 2 */
|
|
76
|
|
77 /**
|
|
78 * @}
|
|
79 */
|
|
80
|
|
81 /**
|
|
82 * @}
|
|
83 */
|
|
84
|
|
85 /************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/
|