my fork
Fork of mbed by
TARGET_NUCLEO_F302R8/stm32f3xx_hal_dma_ex.h@97:4298809c7c9e, 2015-04-08 (annotated)
- Committer:
- filartrix
- Date:
- Wed Apr 08 14:12:53 2015 +0000
- Revision:
- 97:4298809c7c9e
- Parent:
- 90:cb3d968589d8
First reale BlueNRG module for nucleo 401 board
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
Kojto | 90:cb3d968589d8 | 1 | /** |
Kojto | 90:cb3d968589d8 | 2 | ****************************************************************************** |
Kojto | 90:cb3d968589d8 | 3 | * @file stm32f3xx_hal_dma_ex.h |
Kojto | 90:cb3d968589d8 | 4 | * @author MCD Application Team |
Kojto | 90:cb3d968589d8 | 5 | * @version V1.1.0 |
Kojto | 90:cb3d968589d8 | 6 | * @date 12-Sept-2014 |
Kojto | 90:cb3d968589d8 | 7 | * @brief Header file of DMA HAL Extended module. |
Kojto | 90:cb3d968589d8 | 8 | ****************************************************************************** |
Kojto | 90:cb3d968589d8 | 9 | * @attention |
Kojto | 90:cb3d968589d8 | 10 | * |
Kojto | 90:cb3d968589d8 | 11 | * <h2><center>© COPYRIGHT(c) 2014 STMicroelectronics</center></h2> |
Kojto | 90:cb3d968589d8 | 12 | * |
Kojto | 90:cb3d968589d8 | 13 | * Redistribution and use in source and binary forms, with or without modification, |
Kojto | 90:cb3d968589d8 | 14 | * are permitted provided that the following conditions are met: |
Kojto | 90:cb3d968589d8 | 15 | * 1. Redistributions of source code must retain the above copyright notice, |
Kojto | 90:cb3d968589d8 | 16 | * this list of conditions and the following disclaimer. |
Kojto | 90:cb3d968589d8 | 17 | * 2. Redistributions in binary form must reproduce the above copyright notice, |
Kojto | 90:cb3d968589d8 | 18 | * this list of conditions and the following disclaimer in the documentation |
Kojto | 90:cb3d968589d8 | 19 | * and/or other materials provided with the distribution. |
Kojto | 90:cb3d968589d8 | 20 | * 3. Neither the name of STMicroelectronics nor the names of its contributors |
Kojto | 90:cb3d968589d8 | 21 | * may be used to endorse or promote products derived from this software |
Kojto | 90:cb3d968589d8 | 22 | * without specific prior written permission. |
Kojto | 90:cb3d968589d8 | 23 | * |
Kojto | 90:cb3d968589d8 | 24 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" |
Kojto | 90:cb3d968589d8 | 25 | * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE |
Kojto | 90:cb3d968589d8 | 26 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE |
Kojto | 90:cb3d968589d8 | 27 | * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE |
Kojto | 90:cb3d968589d8 | 28 | * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL |
Kojto | 90:cb3d968589d8 | 29 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR |
Kojto | 90:cb3d968589d8 | 30 | * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER |
Kojto | 90:cb3d968589d8 | 31 | * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, |
Kojto | 90:cb3d968589d8 | 32 | * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE |
Kojto | 90:cb3d968589d8 | 33 | * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
Kojto | 90:cb3d968589d8 | 34 | * |
Kojto | 90:cb3d968589d8 | 35 | ****************************************************************************** |
Kojto | 90:cb3d968589d8 | 36 | */ |
Kojto | 90:cb3d968589d8 | 37 | |
Kojto | 90:cb3d968589d8 | 38 | /* Define to prevent recursive inclusion -------------------------------------*/ |
Kojto | 90:cb3d968589d8 | 39 | #ifndef __STM32F3xx_HAL_DMA_EX_H |
Kojto | 90:cb3d968589d8 | 40 | #define __STM32F3xx_HAL_DMA_EX_H |
Kojto | 90:cb3d968589d8 | 41 | |
Kojto | 90:cb3d968589d8 | 42 | #ifdef __cplusplus |
Kojto | 90:cb3d968589d8 | 43 | extern "C" { |
Kojto | 90:cb3d968589d8 | 44 | #endif |
Kojto | 90:cb3d968589d8 | 45 | |
Kojto | 90:cb3d968589d8 | 46 | /* Includes ------------------------------------------------------------------*/ |
Kojto | 90:cb3d968589d8 | 47 | #include "stm32f3xx_hal_def.h" |
Kojto | 90:cb3d968589d8 | 48 | |
Kojto | 90:cb3d968589d8 | 49 | /** @addtogroup STM32F3xx_HAL_Driver |
Kojto | 90:cb3d968589d8 | 50 | * @{ |
Kojto | 90:cb3d968589d8 | 51 | */ |
Kojto | 90:cb3d968589d8 | 52 | |
Kojto | 90:cb3d968589d8 | 53 | /** @addtogroup DMAEx DMA Extended HAL module driver |
Kojto | 90:cb3d968589d8 | 54 | * @{ |
Kojto | 90:cb3d968589d8 | 55 | */ |
Kojto | 90:cb3d968589d8 | 56 | |
Kojto | 90:cb3d968589d8 | 57 | /* Exported types ------------------------------------------------------------*/ |
Kojto | 90:cb3d968589d8 | 58 | /* Exported constants --------------------------------------------------------*/ |
Kojto | 90:cb3d968589d8 | 59 | /* Exported macros -----------------------------------------------------------*/ |
Kojto | 90:cb3d968589d8 | 60 | /** @defgroup DMAEx_Exported_Macros DMA Extended Exported Macros |
Kojto | 90:cb3d968589d8 | 61 | * @{ |
Kojto | 90:cb3d968589d8 | 62 | */ |
Kojto | 90:cb3d968589d8 | 63 | /* Interrupt & Flag management */ |
Kojto | 90:cb3d968589d8 | 64 | |
Kojto | 90:cb3d968589d8 | 65 | /** |
Kojto | 90:cb3d968589d8 | 66 | * @brief Returns the current DMA Channel transfer complete flag. |
Kojto | 90:cb3d968589d8 | 67 | * @param __HANDLE__: DMA handle |
Kojto | 90:cb3d968589d8 | 68 | * @retval The specified transfer complete flag index. |
Kojto | 90:cb3d968589d8 | 69 | */ |
Kojto | 90:cb3d968589d8 | 70 | |
Kojto | 90:cb3d968589d8 | 71 | #if defined(STM32F302xE) || defined(STM32F303xE) || defined(STM32F398xx) || \ |
Kojto | 90:cb3d968589d8 | 72 | defined(STM32F302xC) || defined(STM32F303xC) || defined(STM32F358xx) || \ |
Kojto | 90:cb3d968589d8 | 73 | defined(STM32F373xC) || defined(STM32F378xx) |
Kojto | 90:cb3d968589d8 | 74 | /** @defgroup STM32F302xE_STM32F303xE_STM32F398xx_STM32F302xC_STM32F303xC_STM32F3058xx_STM32F373xC_STM32F378xx Product devices |
Kojto | 90:cb3d968589d8 | 75 | * @{ |
Kojto | 90:cb3d968589d8 | 76 | */ |
Kojto | 90:cb3d968589d8 | 77 | #define __HAL_DMA_GET_TC_FLAG_INDEX(__HANDLE__) \ |
Kojto | 90:cb3d968589d8 | 78 | (((uint32_t)((__HANDLE__)->Instance) == ((uint32_t)DMA1_Channel1))? DMA_FLAG_TC1 :\ |
Kojto | 90:cb3d968589d8 | 79 | ((uint32_t)((__HANDLE__)->Instance) == ((uint32_t)DMA1_Channel2))? DMA_FLAG_TC2 :\ |
Kojto | 90:cb3d968589d8 | 80 | ((uint32_t)((__HANDLE__)->Instance) == ((uint32_t)DMA1_Channel3))? DMA_FLAG_TC3 :\ |
Kojto | 90:cb3d968589d8 | 81 | ((uint32_t)((__HANDLE__)->Instance) == ((uint32_t)DMA1_Channel4))? DMA_FLAG_TC4 :\ |
Kojto | 90:cb3d968589d8 | 82 | ((uint32_t)((__HANDLE__)->Instance) == ((uint32_t)DMA1_Channel5))? DMA_FLAG_TC5 :\ |
Kojto | 90:cb3d968589d8 | 83 | ((uint32_t)((__HANDLE__)->Instance) == ((uint32_t)DMA1_Channel6))? DMA_FLAG_TC6 :\ |
Kojto | 90:cb3d968589d8 | 84 | ((uint32_t)((__HANDLE__)->Instance) == ((uint32_t)DMA1_Channel7))? DMA_FLAG_TC7 :\ |
Kojto | 90:cb3d968589d8 | 85 | ((uint32_t)((__HANDLE__)->Instance) == ((uint32_t)DMA2_Channel1))? DMA_FLAG_TC1 :\ |
Kojto | 90:cb3d968589d8 | 86 | ((uint32_t)((__HANDLE__)->Instance) == ((uint32_t)DMA2_Channel2))? DMA_FLAG_TC2 :\ |
Kojto | 90:cb3d968589d8 | 87 | ((uint32_t)((__HANDLE__)->Instance) == ((uint32_t)DMA2_Channel3))? DMA_FLAG_TC3 :\ |
Kojto | 90:cb3d968589d8 | 88 | ((uint32_t)((__HANDLE__)->Instance) == ((uint32_t)DMA2_Channel4))? DMA_FLAG_TC4 :\ |
Kojto | 90:cb3d968589d8 | 89 | DMA_FLAG_TC5) |
Kojto | 90:cb3d968589d8 | 90 | |
Kojto | 90:cb3d968589d8 | 91 | /** |
Kojto | 90:cb3d968589d8 | 92 | * @brief Returns the current DMA Channel half transfer complete flag. |
Kojto | 90:cb3d968589d8 | 93 | * @param __HANDLE__: DMA handle |
Kojto | 90:cb3d968589d8 | 94 | * @retval The specified half transfer complete flag index. |
Kojto | 90:cb3d968589d8 | 95 | */ |
Kojto | 90:cb3d968589d8 | 96 | #define __HAL_DMA_GET_HT_FLAG_INDEX(__HANDLE__)\ |
Kojto | 90:cb3d968589d8 | 97 | (((uint32_t)((__HANDLE__)->Instance) == ((uint32_t)DMA1_Channel1))? DMA_FLAG_HT1 :\ |
Kojto | 90:cb3d968589d8 | 98 | ((uint32_t)((__HANDLE__)->Instance) == ((uint32_t)DMA1_Channel2))? DMA_FLAG_HT2 :\ |
Kojto | 90:cb3d968589d8 | 99 | ((uint32_t)((__HANDLE__)->Instance) == ((uint32_t)DMA1_Channel3))? DMA_FLAG_HT3 :\ |
Kojto | 90:cb3d968589d8 | 100 | ((uint32_t)((__HANDLE__)->Instance) == ((uint32_t)DMA1_Channel4))? DMA_FLAG_HT4 :\ |
Kojto | 90:cb3d968589d8 | 101 | ((uint32_t)((__HANDLE__)->Instance) == ((uint32_t)DMA1_Channel5))? DMA_FLAG_HT5 :\ |
Kojto | 90:cb3d968589d8 | 102 | ((uint32_t)((__HANDLE__)->Instance) == ((uint32_t)DMA1_Channel6))? DMA_FLAG_HT6 :\ |
Kojto | 90:cb3d968589d8 | 103 | ((uint32_t)((__HANDLE__)->Instance) == ((uint32_t)DMA1_Channel7))? DMA_FLAG_HT7 :\ |
Kojto | 90:cb3d968589d8 | 104 | ((uint32_t)((__HANDLE__)->Instance) == ((uint32_t)DMA2_Channel1))? DMA_FLAG_HT1 :\ |
Kojto | 90:cb3d968589d8 | 105 | ((uint32_t)((__HANDLE__)->Instance) == ((uint32_t)DMA2_Channel2))? DMA_FLAG_HT2 :\ |
Kojto | 90:cb3d968589d8 | 106 | ((uint32_t)((__HANDLE__)->Instance) == ((uint32_t)DMA2_Channel3))? DMA_FLAG_HT3 :\ |
Kojto | 90:cb3d968589d8 | 107 | ((uint32_t)((__HANDLE__)->Instance) == ((uint32_t)DMA2_Channel4))? DMA_FLAG_HT4 :\ |
Kojto | 90:cb3d968589d8 | 108 | DMA_FLAG_HT5) |
Kojto | 90:cb3d968589d8 | 109 | |
Kojto | 90:cb3d968589d8 | 110 | /** |
Kojto | 90:cb3d968589d8 | 111 | * @brief Returns the current DMA Channel transfer error flag. |
Kojto | 90:cb3d968589d8 | 112 | * @param __HANDLE__: DMA handle |
Kojto | 90:cb3d968589d8 | 113 | * @retval The specified transfer error flag index. |
Kojto | 90:cb3d968589d8 | 114 | */ |
Kojto | 90:cb3d968589d8 | 115 | #define __HAL_DMA_GET_TE_FLAG_INDEX(__HANDLE__)\ |
Kojto | 90:cb3d968589d8 | 116 | (((uint32_t)((__HANDLE__)->Instance) == ((uint32_t)DMA1_Channel1))? DMA_FLAG_TE1 :\ |
Kojto | 90:cb3d968589d8 | 117 | ((uint32_t)((__HANDLE__)->Instance) == ((uint32_t)DMA1_Channel2))? DMA_FLAG_TE2 :\ |
Kojto | 90:cb3d968589d8 | 118 | ((uint32_t)((__HANDLE__)->Instance) == ((uint32_t)DMA1_Channel3))? DMA_FLAG_TE3 :\ |
Kojto | 90:cb3d968589d8 | 119 | ((uint32_t)((__HANDLE__)->Instance) == ((uint32_t)DMA1_Channel4))? DMA_FLAG_TE4 :\ |
Kojto | 90:cb3d968589d8 | 120 | ((uint32_t)((__HANDLE__)->Instance) == ((uint32_t)DMA1_Channel5))? DMA_FLAG_TE5 :\ |
Kojto | 90:cb3d968589d8 | 121 | ((uint32_t)((__HANDLE__)->Instance) == ((uint32_t)DMA1_Channel6))? DMA_FLAG_TE6 :\ |
Kojto | 90:cb3d968589d8 | 122 | ((uint32_t)((__HANDLE__)->Instance) == ((uint32_t)DMA1_Channel7))? DMA_FLAG_TE7 :\ |
Kojto | 90:cb3d968589d8 | 123 | ((uint32_t)((__HANDLE__)->Instance) == ((uint32_t)DMA2_Channel1))? DMA_FLAG_TE1 :\ |
Kojto | 90:cb3d968589d8 | 124 | ((uint32_t)((__HANDLE__)->Instance) == ((uint32_t)DMA2_Channel2))? DMA_FLAG_TE2 :\ |
Kojto | 90:cb3d968589d8 | 125 | ((uint32_t)((__HANDLE__)->Instance) == ((uint32_t)DMA2_Channel3))? DMA_FLAG_TE3 :\ |
Kojto | 90:cb3d968589d8 | 126 | ((uint32_t)((__HANDLE__)->Instance) == ((uint32_t)DMA2_Channel4))? DMA_FLAG_TE4 :\ |
Kojto | 90:cb3d968589d8 | 127 | DMA_FLAG_TE5) |
Kojto | 90:cb3d968589d8 | 128 | |
Kojto | 90:cb3d968589d8 | 129 | /** |
Kojto | 90:cb3d968589d8 | 130 | * @brief Get the DMA Channel pending flags. |
Kojto | 90:cb3d968589d8 | 131 | * @param __HANDLE__: DMA handle |
Kojto | 90:cb3d968589d8 | 132 | * @param __FLAG__: Get the specified flag. |
Kojto | 90:cb3d968589d8 | 133 | * This parameter can be any combination of the following values: |
Kojto | 90:cb3d968589d8 | 134 | * @arg DMA_FLAG_TCx: Transfer complete flag |
Kojto | 90:cb3d968589d8 | 135 | * @arg DMA_FLAG_HTx: Half transfer complete flag |
Kojto | 90:cb3d968589d8 | 136 | * @arg DMA_FLAG_TEx: Transfer error flag |
Kojto | 90:cb3d968589d8 | 137 | * Where x can be 0, 1, 2, 3, 4, 5, 6 or 7 to select the DMA Channel flag. |
Kojto | 90:cb3d968589d8 | 138 | * @retval The state of FLAG (SET or RESET). |
Kojto | 90:cb3d968589d8 | 139 | */ |
Kojto | 90:cb3d968589d8 | 140 | |
Kojto | 90:cb3d968589d8 | 141 | #define __HAL_DMA_GET_FLAG(__HANDLE__, __FLAG__)\ |
Kojto | 90:cb3d968589d8 | 142 | (((uint32_t)((__HANDLE__)->Instance) > (uint32_t)DMA1_Channel7)? (DMA2->ISR & (__FLAG__)) :\ |
Kojto | 90:cb3d968589d8 | 143 | (DMA1->ISR & (__FLAG__))) |
Kojto | 90:cb3d968589d8 | 144 | |
Kojto | 90:cb3d968589d8 | 145 | /** |
Kojto | 90:cb3d968589d8 | 146 | * @brief Clears the DMA Channel pending flags. |
Kojto | 90:cb3d968589d8 | 147 | * @param __HANDLE__: DMA handle |
Kojto | 90:cb3d968589d8 | 148 | * @param __FLAG__: specifies the flag to clear. |
Kojto | 90:cb3d968589d8 | 149 | * This parameter can be any combination of the following values: |
Kojto | 90:cb3d968589d8 | 150 | * @arg DMA_FLAG_TCx: Transfer complete flag |
Kojto | 90:cb3d968589d8 | 151 | * @arg DMA_FLAG_HTx: Half transfer complete flag |
Kojto | 90:cb3d968589d8 | 152 | * @arg DMA_FLAG_TEx: Transfer error flag |
Kojto | 90:cb3d968589d8 | 153 | * Where x can be 0, 1, 2, 3, 4, 5, 6 or 7 to select the DMA Channel flag. |
Kojto | 90:cb3d968589d8 | 154 | * @retval None |
Kojto | 90:cb3d968589d8 | 155 | */ |
Kojto | 90:cb3d968589d8 | 156 | #define __HAL_DMA_CLEAR_FLAG(__HANDLE__, __FLAG__) \ |
Kojto | 90:cb3d968589d8 | 157 | (((uint32_t)((__HANDLE__)->Instance) > (uint32_t)DMA1_Channel7)? (DMA2->IFCR = (__FLAG__)) :\ |
Kojto | 90:cb3d968589d8 | 158 | (DMA1->IFCR = (__FLAG__))) |
Kojto | 90:cb3d968589d8 | 159 | |
Kojto | 90:cb3d968589d8 | 160 | /** |
Kojto | 90:cb3d968589d8 | 161 | * @} |
Kojto | 90:cb3d968589d8 | 162 | */ |
Kojto | 90:cb3d968589d8 | 163 | |
Kojto | 90:cb3d968589d8 | 164 | #else |
Kojto | 90:cb3d968589d8 | 165 | |
Kojto | 90:cb3d968589d8 | 166 | /** @defgroup STM32F301x8_STM32F302x8_STM32F318xx_STM32F303x8_STM32F334x8_STM32F328xx Product devices |
Kojto | 90:cb3d968589d8 | 167 | * @{ |
Kojto | 90:cb3d968589d8 | 168 | */ |
Kojto | 90:cb3d968589d8 | 169 | #define __HAL_DMA_GET_TC_FLAG_INDEX(__HANDLE__) \ |
Kojto | 90:cb3d968589d8 | 170 | (((uint32_t)((__HANDLE__)->Instance) == ((uint32_t)DMA1_Channel1))? DMA_FLAG_TC1 :\ |
Kojto | 90:cb3d968589d8 | 171 | ((uint32_t)((__HANDLE__)->Instance) == ((uint32_t)DMA1_Channel2))? DMA_FLAG_TC2 :\ |
Kojto | 90:cb3d968589d8 | 172 | ((uint32_t)((__HANDLE__)->Instance) == ((uint32_t)DMA1_Channel3))? DMA_FLAG_TC3 :\ |
Kojto | 90:cb3d968589d8 | 173 | ((uint32_t)((__HANDLE__)->Instance) == ((uint32_t)DMA1_Channel4))? DMA_FLAG_TC4 :\ |
Kojto | 90:cb3d968589d8 | 174 | ((uint32_t)((__HANDLE__)->Instance) == ((uint32_t)DMA1_Channel5))? DMA_FLAG_TC5 :\ |
Kojto | 90:cb3d968589d8 | 175 | ((uint32_t)((__HANDLE__)->Instance) == ((uint32_t)DMA1_Channel6))? DMA_FLAG_TC6 :\ |
Kojto | 90:cb3d968589d8 | 176 | DMA_FLAG_TC7) |
Kojto | 90:cb3d968589d8 | 177 | |
Kojto | 90:cb3d968589d8 | 178 | /** |
Kojto | 90:cb3d968589d8 | 179 | * @brief Returns the current DMA Channel half transfer complete flag. |
Kojto | 90:cb3d968589d8 | 180 | * @param __HANDLE__: DMA handle |
Kojto | 90:cb3d968589d8 | 181 | * @retval The specified half transfer complete flag index. |
Kojto | 90:cb3d968589d8 | 182 | */ |
Kojto | 90:cb3d968589d8 | 183 | #define __HAL_DMA_GET_HT_FLAG_INDEX(__HANDLE__)\ |
Kojto | 90:cb3d968589d8 | 184 | (((uint32_t)((__HANDLE__)->Instance) == ((uint32_t)DMA1_Channel1))? DMA_FLAG_HT1 :\ |
Kojto | 90:cb3d968589d8 | 185 | ((uint32_t)((__HANDLE__)->Instance) == ((uint32_t)DMA1_Channel2))? DMA_FLAG_HT2 :\ |
Kojto | 90:cb3d968589d8 | 186 | ((uint32_t)((__HANDLE__)->Instance) == ((uint32_t)DMA1_Channel3))? DMA_FLAG_HT3 :\ |
Kojto | 90:cb3d968589d8 | 187 | ((uint32_t)((__HANDLE__)->Instance) == ((uint32_t)DMA1_Channel4))? DMA_FLAG_HT4 :\ |
Kojto | 90:cb3d968589d8 | 188 | ((uint32_t)((__HANDLE__)->Instance) == ((uint32_t)DMA1_Channel5))? DMA_FLAG_HT5 :\ |
Kojto | 90:cb3d968589d8 | 189 | ((uint32_t)((__HANDLE__)->Instance) == ((uint32_t)DMA1_Channel6))? DMA_FLAG_HT6 :\ |
Kojto | 90:cb3d968589d8 | 190 | DMA_FLAG_HT7) |
Kojto | 90:cb3d968589d8 | 191 | |
Kojto | 90:cb3d968589d8 | 192 | /** |
Kojto | 90:cb3d968589d8 | 193 | * @brief Returns the current DMA Channel transfer error flag. |
Kojto | 90:cb3d968589d8 | 194 | * @param __HANDLE__: DMA handle |
Kojto | 90:cb3d968589d8 | 195 | * @retval The specified transfer error flag index. |
Kojto | 90:cb3d968589d8 | 196 | */ |
Kojto | 90:cb3d968589d8 | 197 | #define __HAL_DMA_GET_TE_FLAG_INDEX(__HANDLE__)\ |
Kojto | 90:cb3d968589d8 | 198 | (((uint32_t)((__HANDLE__)->Instance) == ((uint32_t)DMA1_Channel1))? DMA_FLAG_TE1 :\ |
Kojto | 90:cb3d968589d8 | 199 | ((uint32_t)((__HANDLE__)->Instance) == ((uint32_t)DMA1_Channel2))? DMA_FLAG_TE2 :\ |
Kojto | 90:cb3d968589d8 | 200 | ((uint32_t)((__HANDLE__)->Instance) == ((uint32_t)DMA1_Channel3))? DMA_FLAG_TE3 :\ |
Kojto | 90:cb3d968589d8 | 201 | ((uint32_t)((__HANDLE__)->Instance) == ((uint32_t)DMA1_Channel4))? DMA_FLAG_TE4 :\ |
Kojto | 90:cb3d968589d8 | 202 | ((uint32_t)((__HANDLE__)->Instance) == ((uint32_t)DMA1_Channel5))? DMA_FLAG_TE5 :\ |
Kojto | 90:cb3d968589d8 | 203 | ((uint32_t)((__HANDLE__)->Instance) == ((uint32_t)DMA1_Channel6))? DMA_FLAG_TE6 :\ |
Kojto | 90:cb3d968589d8 | 204 | DMA_FLAG_TE7) |
Kojto | 90:cb3d968589d8 | 205 | |
Kojto | 90:cb3d968589d8 | 206 | /** |
Kojto | 90:cb3d968589d8 | 207 | * @brief Get the DMA Channel pending flags. |
Kojto | 90:cb3d968589d8 | 208 | * @param __HANDLE__: DMA handle |
Kojto | 90:cb3d968589d8 | 209 | * @param __FLAG__: Get the specified flag. |
Kojto | 90:cb3d968589d8 | 210 | * This parameter can be any combination of the following values: |
Kojto | 90:cb3d968589d8 | 211 | * @arg DMA_FLAG_TCx: Transfer complete flag |
Kojto | 90:cb3d968589d8 | 212 | * @arg DMA_FLAG_HTx: Half transfer complete flag |
Kojto | 90:cb3d968589d8 | 213 | * @arg DMA_FLAG_TEx: Transfer error flag |
Kojto | 90:cb3d968589d8 | 214 | * Where x can be 0, 1, 2, 3, 4, 5, 6 or 7 to select the DMA Channel flag. |
Kojto | 90:cb3d968589d8 | 215 | * @retval The state of FLAG (SET or RESET). |
Kojto | 90:cb3d968589d8 | 216 | */ |
Kojto | 90:cb3d968589d8 | 217 | |
Kojto | 90:cb3d968589d8 | 218 | #define __HAL_DMA_GET_FLAG(__HANDLE__, __FLAG__) (DMA1->ISR & (__FLAG__)) |
Kojto | 90:cb3d968589d8 | 219 | |
Kojto | 90:cb3d968589d8 | 220 | /** |
Kojto | 90:cb3d968589d8 | 221 | * @brief Clears the DMA Channel pending flags. |
Kojto | 90:cb3d968589d8 | 222 | * @param __HANDLE__: DMA handle |
Kojto | 90:cb3d968589d8 | 223 | * @param __FLAG__: specifies the flag to clear. |
Kojto | 90:cb3d968589d8 | 224 | * This parameter can be any combination of the following values: |
Kojto | 90:cb3d968589d8 | 225 | * @arg DMA_FLAG_TCx: Transfer complete flag |
Kojto | 90:cb3d968589d8 | 226 | * @arg DMA_FLAG_HTx: Half transfer complete flag |
Kojto | 90:cb3d968589d8 | 227 | * @arg DMA_FLAG_TEx: Transfer error flag |
Kojto | 90:cb3d968589d8 | 228 | * Where x can be 0, 1, 2, 3, 4, 5, 6 or 7 to select the DMA Channel flag. |
Kojto | 90:cb3d968589d8 | 229 | * @retval None |
Kojto | 90:cb3d968589d8 | 230 | */ |
Kojto | 90:cb3d968589d8 | 231 | #define __HAL_DMA_CLEAR_FLAG(__HANDLE__, __FLAG__) (DMA1->IFCR |= (__FLAG__)) |
Kojto | 90:cb3d968589d8 | 232 | |
Kojto | 90:cb3d968589d8 | 233 | /** |
Kojto | 90:cb3d968589d8 | 234 | * @} |
Kojto | 90:cb3d968589d8 | 235 | */ |
Kojto | 90:cb3d968589d8 | 236 | |
Kojto | 90:cb3d968589d8 | 237 | #endif |
Kojto | 90:cb3d968589d8 | 238 | |
Kojto | 90:cb3d968589d8 | 239 | /** |
Kojto | 90:cb3d968589d8 | 240 | * @} |
Kojto | 90:cb3d968589d8 | 241 | */ |
Kojto | 90:cb3d968589d8 | 242 | |
Kojto | 90:cb3d968589d8 | 243 | /** |
Kojto | 90:cb3d968589d8 | 244 | * @} |
Kojto | 90:cb3d968589d8 | 245 | */ |
Kojto | 90:cb3d968589d8 | 246 | |
Kojto | 90:cb3d968589d8 | 247 | /** |
Kojto | 90:cb3d968589d8 | 248 | * @} |
Kojto | 90:cb3d968589d8 | 249 | */ |
Kojto | 90:cb3d968589d8 | 250 | |
Kojto | 90:cb3d968589d8 | 251 | #ifdef __cplusplus |
Kojto | 90:cb3d968589d8 | 252 | } |
Kojto | 90:cb3d968589d8 | 253 | #endif /* STM32F302xE || STM32F303xE || STM32F398xx || */ |
Kojto | 90:cb3d968589d8 | 254 | /* STM32F302xC || STM32F303xC || STM32F358xx || */ |
Kojto | 90:cb3d968589d8 | 255 | /* STM32F373xC || STM32F378xx */ |
Kojto | 90:cb3d968589d8 | 256 | |
Kojto | 90:cb3d968589d8 | 257 | #endif /* __STM32F3xx_HAL_DMA_H */ |
Kojto | 90:cb3d968589d8 | 258 | |
Kojto | 90:cb3d968589d8 | 259 | /************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/ |