The official mbed C/C SDK provides the software platform and libraries to build your applications.

Fork of mbed by mbed official

Committer:
Kojto
Date:
Tue Feb 03 15:31:20 2015 +0000
Revision:
93:e188a91d3eaa
Parent:
90:cb3d968589d8
Release 93 of the mbed library

Main changes:

- Renesas RZ_A1H bugfixes - i2c, ticker
- new targets - Nucleo F303RE, Nucleo F070RB, BLE SMURFS,
Dragonfly 411RE,
- BusXXX - is connected method, plus operators addition
- LPC8xx - I2c fixes
- timestamp_t reverted to uint32_t
- RTX - fixes regarding stack (alignment, magic word)

Who changed what in which revision?

UserRevisionLine numberNew contents of line
Kojto 90:cb3d968589d8 1 /**
Kojto 90:cb3d968589d8 2 ******************************************************************************
Kojto 90:cb3d968589d8 3 * @file stm32f0xx_hal_dma_ex.h
Kojto 90:cb3d968589d8 4 * @author MCD Application Team
Kojto 93:e188a91d3eaa 5 * @version V1.2.0
Kojto 93:e188a91d3eaa 6 * @date 11-December-2014
Kojto 90:cb3d968589d8 7 * @brief Header file of DMA HAL Extension module.
Kojto 90:cb3d968589d8 8 ******************************************************************************
Kojto 90:cb3d968589d8 9 * @attention
Kojto 90:cb3d968589d8 10 *
Kojto 90:cb3d968589d8 11 * <h2><center>&copy; 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 __STM32F0xx_HAL_DMA_EX_H
Kojto 90:cb3d968589d8 40 #define __STM32F0xx_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 "stm32f0xx_hal_def.h"
Kojto 90:cb3d968589d8 48
Kojto 90:cb3d968589d8 49 /** @addtogroup STM32F0xx_HAL_Driver
Kojto 90:cb3d968589d8 50 * @{
Kojto 90:cb3d968589d8 51 */
Kojto 90:cb3d968589d8 52
Kojto 90:cb3d968589d8 53 /** @addtogroup DMAEx
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 93:e188a91d3eaa 59 #if defined(STM32F091xC) || defined(STM32F098xx) || defined(STM32F030xC)
Kojto 90:cb3d968589d8 60 /** @defgroup DMAEx_Exported_Constants DMAEx Exported Constants
Kojto 90:cb3d968589d8 61 * @{
Kojto 90:cb3d968589d8 62 */
Kojto 93:e188a91d3eaa 63 #define DMA1_CHANNEL1_RMP 0x00000000 /*!< Internal define for remaping on STM32F09x/30xC */
Kojto 93:e188a91d3eaa 64 #define DMA1_CHANNEL2_RMP 0x10000000 /*!< Internal define for remaping on STM32F09x/30xC */
Kojto 93:e188a91d3eaa 65 #define DMA1_CHANNEL3_RMP 0x20000000 /*!< Internal define for remaping on STM32F09x/30xC */
Kojto 93:e188a91d3eaa 66 #define DMA1_CHANNEL4_RMP 0x30000000 /*!< Internal define for remaping on STM32F09x/30xC */
Kojto 93:e188a91d3eaa 67 #define DMA1_CHANNEL5_RMP 0x40000000 /*!< Internal define for remaping on STM32F09x/30xC */
Kojto 93:e188a91d3eaa 68 #if !defined(STM32F030xC)
Kojto 93:e188a91d3eaa 69 #define DMA1_CHANNEL6_RMP 0x50000000 /*!< Internal define for remaping on STM32F09x/30xC */
Kojto 93:e188a91d3eaa 70 #define DMA1_CHANNEL7_RMP 0x60000000 /*!< Internal define for remaping on STM32F09x/30xC */
Kojto 93:e188a91d3eaa 71 #define DMA2_CHANNEL1_RMP 0x00000000 /*!< Internal define for remaping on STM32F09x/30xC */
Kojto 93:e188a91d3eaa 72 #define DMA2_CHANNEL2_RMP 0x10000000 /*!< Internal define for remaping on STM32F09x/30xC */
Kojto 93:e188a91d3eaa 73 #define DMA2_CHANNEL3_RMP 0x20000000 /*!< Internal define for remaping on STM32F09x/30xC */
Kojto 93:e188a91d3eaa 74 #define DMA2_CHANNEL4_RMP 0x30000000 /*!< Internal define for remaping on STM32F09x/30xC */
Kojto 93:e188a91d3eaa 75 #define DMA2_CHANNEL5_RMP 0x40000000 /*!< Internal define for remaping on STM32F09x/30xC */
Kojto 93:e188a91d3eaa 76 #endif /* !defined(STM32F030xC) */
Kojto 90:cb3d968589d8 77
Kojto 90:cb3d968589d8 78 /****************** DMA1 remap bit field definition********************/
Kojto 90:cb3d968589d8 79 /* DMA1 - Channel 1 */
Kojto 93:e188a91d3eaa 80 #define HAL_DMA1_CH1_DEFAULT (uint32_t) (DMA1_CHANNEL1_RMP | DMA1_CSELR_DEFAULT) /*!< Default remap position for DMA1 */
Kojto 93:e188a91d3eaa 81 #define HAL_DMA1_CH1_ADC (uint32_t) (DMA1_CHANNEL1_RMP | DMA1_CSELR_CH1_ADC) /*!< Remap ADC on DMA1 Channel 1*/
Kojto 93:e188a91d3eaa 82 #define HAL_DMA1_CH1_TIM17_CH1 (uint32_t) (DMA1_CHANNEL1_RMP | DMA1_CSELR_CH1_TIM17_CH1) /*!< Remap TIM17 channel 1 on DMA1 channel 1 */
Kojto 93:e188a91d3eaa 83 #define HAL_DMA1_CH1_TIM17_UP (uint32_t) (DMA1_CHANNEL1_RMP | DMA1_CSELR_CH1_TIM17_UP) /*!< Remap TIM17 up on DMA1 channel 1 */
Kojto 93:e188a91d3eaa 84 #define HAL_DMA1_CH1_USART1_RX (uint32_t) (DMA1_CHANNEL1_RMP | DMA1_CSELR_CH1_USART1_RX) /*!< Remap USART1 Rx on DMA1 channel 1 */
Kojto 93:e188a91d3eaa 85 #define HAL_DMA1_CH1_USART2_RX (uint32_t) (DMA1_CHANNEL1_RMP | DMA1_CSELR_CH1_USART2_RX) /*!< Remap USART2 Rx on DMA1 channel 1 */
Kojto 93:e188a91d3eaa 86 #define HAL_DMA1_CH1_USART3_RX (uint32_t) (DMA1_CHANNEL1_RMP | DMA1_CSELR_CH1_USART3_RX) /*!< Remap USART3 Rx on DMA1 channel 1 */
Kojto 93:e188a91d3eaa 87 #define HAL_DMA1_CH1_USART4_RX (uint32_t) (DMA1_CHANNEL1_RMP | DMA1_CSELR_CH1_USART4_RX) /*!< Remap USART4 Rx on DMA1 channel 1 */
Kojto 93:e188a91d3eaa 88 #define HAL_DMA1_CH1_USART5_RX (uint32_t) (DMA1_CHANNEL1_RMP | DMA1_CSELR_CH1_USART5_RX) /*!< Remap USART5 Rx on DMA1 channel 1 */
Kojto 93:e188a91d3eaa 89 #define HAL_DMA1_CH1_USART6_RX (uint32_t) (DMA1_CHANNEL1_RMP | DMA1_CSELR_CH1_USART6_RX) /*!< Remap USART6 Rx on DMA1 channel 1 */
Kojto 93:e188a91d3eaa 90 #if !defined(STM32F030xC)
Kojto 93:e188a91d3eaa 91 #define HAL_DMA1_CH1_USART7_RX (uint32_t) (DMA1_CHANNEL1_RMP | DMA1_CSELR_CH1_USART7_RX) /*!< Remap USART7 Rx on DMA1 channel 1 */
Kojto 93:e188a91d3eaa 92 #define HAL_DMA1_CH1_USART8_RX (uint32_t) (DMA1_CHANNEL1_RMP | DMA1_CSELR_CH1_USART8_RX) /*!< Remap USART8 Rx on DMA1 channel 1 */
Kojto 93:e188a91d3eaa 93 #endif /* !defined(STM32F030xC) */
Kojto 93:e188a91d3eaa 94
Kojto 90:cb3d968589d8 95 /* DMA1 - Channel 2 */
Kojto 93:e188a91d3eaa 96 #define HAL_DMA1_CH2_DEFAULT (uint32_t) (DMA1_CHANNEL2_RMP | DMA1_CSELR_DEFAULT) /*!< Default remap position for DMA1 */
Kojto 93:e188a91d3eaa 97 #define HAL_DMA1_CH2_ADC (uint32_t) (DMA1_CHANNEL2_RMP | DMA1_CSELR_CH2_ADC) /*!< Remap ADC on DMA1 channel 2 */
Kojto 93:e188a91d3eaa 98 #define HAL_DMA1_CH2_I2C1_TX (uint32_t) (DMA1_CHANNEL2_RMP | DMA1_CSELR_CH2_I2C1_TX) /*!< Remap I2C1 Tx on DMA1 channel 2 */
Kojto 93:e188a91d3eaa 99 #define HAL_DMA1_CH2_SPI1_RX (uint32_t) (DMA1_CHANNEL2_RMP | DMA1_CSELR_CH2_SPI1_RX) /*!< Remap SPI1 Rx on DMA1 channel 2 */
Kojto 93:e188a91d3eaa 100 #define HAL_DMA1_CH2_TIM1_CH1 (uint32_t) (DMA1_CHANNEL2_RMP | DMA1_CSELR_CH2_TIM1_CH1) /*!< Remap TIM1 channel 1 on DMA1 channel 2 */
Kojto 93:e188a91d3eaa 101 #define HAL_DMA1_CH2_TIM17_CH1 (uint32_t) (DMA1_CHANNEL2_RMP | DMA1_CSELR_CH2_TIM17_CH1) /*!< Remap TIM17 channel 1 on DMA1 channel 2 */
Kojto 93:e188a91d3eaa 102 #define HAL_DMA1_CH2_TIM17_UP (uint32_t) (DMA1_CHANNEL2_RMP | DMA1_CSELR_CH2_TIM17_UP) /*!< Remap TIM17 up on DMA1 channel 2 */
Kojto 93:e188a91d3eaa 103 #define HAL_DMA1_CH2_USART1_TX (uint32_t) (DMA1_CHANNEL2_RMP | DMA1_CSELR_CH2_USART1_TX) /*!< Remap USART1 Tx on DMA1 channel 2 */
Kojto 93:e188a91d3eaa 104 #define HAL_DMA1_CH2_USART2_TX (uint32_t) (DMA1_CHANNEL2_RMP | DMA1_CSELR_CH2_USART2_TX) /*!< Remap USART2 Tx on DMA1 channel 2 */
Kojto 93:e188a91d3eaa 105 #define HAL_DMA1_CH2_USART3_TX (uint32_t) (DMA1_CHANNEL2_RMP | DMA1_CSELR_CH2_USART3_TX) /*!< Remap USART3 Tx on DMA1 channel 2 */
Kojto 93:e188a91d3eaa 106 #define HAL_DMA1_CH2_USART4_TX (uint32_t) (DMA1_CHANNEL2_RMP | DMA1_CSELR_CH2_USART4_TX) /*!< Remap USART4 Tx on DMA1 channel 2 */
Kojto 93:e188a91d3eaa 107 #define HAL_DMA1_CH2_USART5_TX (uint32_t) (DMA1_CHANNEL2_RMP | DMA1_CSELR_CH2_USART5_TX) /*!< Remap USART5 Tx on DMA1 channel 2 */
Kojto 93:e188a91d3eaa 108 #define HAL_DMA1_CH2_USART6_TX (uint32_t) (DMA1_CHANNEL2_RMP | DMA1_CSELR_CH2_USART6_TX) /*!< Remap USART6 Tx on DMA1 channel 2 */
Kojto 93:e188a91d3eaa 109 #if !defined(STM32F030xC)
Kojto 93:e188a91d3eaa 110 #define HAL_DMA1_CH2_USART7_TX (uint32_t) (DMA1_CHANNEL2_RMP | DMA1_CSELR_CH2_USART7_TX) /*!< Remap USART7 Tx on DMA1 channel 2 */
Kojto 93:e188a91d3eaa 111 #define HAL_DMA1_CH2_USART8_TX (uint32_t) (DMA1_CHANNEL2_RMP | DMA1_CSELR_CH2_USART8_TX) /*!< Remap USART8 Tx on DMA1 channel 2 */
Kojto 93:e188a91d3eaa 112 #endif /* !defined(STM32F030xC) */
Kojto 93:e188a91d3eaa 113
Kojto 90:cb3d968589d8 114 /* DMA1 - Channel 3 */
Kojto 93:e188a91d3eaa 115 #define HAL_DMA1_CH3_DEFAULT (uint32_t) (DMA1_CHANNEL3_RMP | DMA1_CSELR_DEFAULT) /*!< Default remap position for DMA1 */
Kojto 93:e188a91d3eaa 116 #define HAL_DMA1_CH3_TIM6_UP (uint32_t) (DMA1_CHANNEL3_RMP | DMA1_CSELR_CH3_TIM6_UP) /*!< Remap TIM6 up on DMA1 channel 3 */
Kojto 93:e188a91d3eaa 117 #if !defined(STM32F030xC)
Kojto 93:e188a91d3eaa 118 #define HAL_DMA1_CH3_DAC_CH1 (uint32_t) (DMA1_CHANNEL3_RMP | DMA1_CSELR_CH3_DAC_CH1) /*!< Remap DAC Channel 1on DMA1 channel 3 */
Kojto 93:e188a91d3eaa 119 #endif /* !defined(STM32F030xC) */
Kojto 93:e188a91d3eaa 120 #define HAL_DMA1_CH3_I2C1_RX (uint32_t) (DMA1_CHANNEL3_RMP | DMA1_CSELR_CH3_I2C1_RX) /*!< Remap I2C1 Rx on DMA1 channel 3 */
Kojto 93:e188a91d3eaa 121 #define HAL_DMA1_CH3_SPI1_TX (uint32_t) (DMA1_CHANNEL3_RMP | DMA1_CSELR_CH3_SPI1_TX) /*!< Remap SPI1 Tx on DMA1 channel 3 */
Kojto 93:e188a91d3eaa 122 #define HAL_DMA1_CH3_TIM1_CH2 (uint32_t) (DMA1_CHANNEL3_RMP | DMA1_CSELR_CH3_TIM1_CH2) /*!< Remap TIM1 channel 2 on DMA1 channel 3 */
Kojto 93:e188a91d3eaa 123 #if !defined(STM32F030xC)
Kojto 93:e188a91d3eaa 124 #define HAL_DMA1_CH3_TIM2_CH2 (uint32_t) (DMA1_CHANNEL3_RMP | DMA1_CSELR_CH3_TIM2_CH2) /*!< Remap TIM2 channel 2 on DMA1 channel 3 */
Kojto 93:e188a91d3eaa 125 #endif /* !defined(STM32F030xC) */
Kojto 93:e188a91d3eaa 126 #define HAL_DMA1_CH3_TIM16_CH1 (uint32_t) (DMA1_CHANNEL3_RMP | DMA1_CSELR_CH3_TIM16_CH1) /*!< Remap TIM16 channel 1 on DMA1 channel 3 */
Kojto 93:e188a91d3eaa 127 #define HAL_DMA1_CH3_TIM16_UP (uint32_t) (DMA1_CHANNEL3_RMP | DMA1_CSELR_CH3_TIM16_UP) /*!< Remap TIM16 up on DMA1 channel 3 */
Kojto 93:e188a91d3eaa 128 #define HAL_DMA1_CH3_USART1_RX (uint32_t) (DMA1_CHANNEL3_RMP | DMA1_CSELR_CH3_USART1_RX) /*!< Remap USART1 Rx on DMA1 channel 3 */
Kojto 93:e188a91d3eaa 129 #define HAL_DMA1_CH3_USART2_RX (uint32_t) (DMA1_CHANNEL3_RMP | DMA1_CSELR_CH3_USART2_RX) /*!< Remap USART2 Rx on DMA1 channel 3 */
Kojto 93:e188a91d3eaa 130 #define HAL_DMA1_CH3_USART3_RX (uint32_t) (DMA1_CHANNEL3_RMP | DMA1_CSELR_CH3_USART3_RX) /*!< Remap USART3 Rx on DMA1 channel 3 */
Kojto 93:e188a91d3eaa 131 #define HAL_DMA1_CH3_USART4_RX (uint32_t) (DMA1_CHANNEL3_RMP | DMA1_CSELR_CH3_USART4_RX) /*!< Remap USART4 Rx on DMA1 channel 3 */
Kojto 93:e188a91d3eaa 132 #define HAL_DMA1_CH3_USART5_RX (uint32_t) (DMA1_CHANNEL3_RMP | DMA1_CSELR_CH3_USART5_RX) /*!< Remap USART5 Rx on DMA1 channel 3 */
Kojto 93:e188a91d3eaa 133 #define HAL_DMA1_CH3_USART6_RX (uint32_t) (DMA1_CHANNEL3_RMP | DMA1_CSELR_CH3_USART6_RX) /*!< Remap USART6 Rx on DMA1 channel 3 */
Kojto 93:e188a91d3eaa 134 #if !defined(STM32F030xC)
Kojto 93:e188a91d3eaa 135 #define HAL_DMA1_CH3_USART7_RX (uint32_t) (DMA1_CHANNEL3_RMP | DMA1_CSELR_CH3_USART7_RX) /*!< Remap USART7 Rx on DMA1 channel 3 */
Kojto 93:e188a91d3eaa 136 #define HAL_DMA1_CH3_USART8_RX (uint32_t) (DMA1_CHANNEL3_RMP | DMA1_CSELR_CH3_USART8_RX) /*!< Remap USART8 Rx on DMA1 channel 3 */
Kojto 93:e188a91d3eaa 137 #endif /* !defined(STM32F030xC) */
Kojto 93:e188a91d3eaa 138
Kojto 90:cb3d968589d8 139 /* DMA1 - Channel 4 */
Kojto 93:e188a91d3eaa 140 #define HAL_DMA1_CH4_DEFAULT (uint32_t) (DMA1_CHANNEL4_RMP | DMA1_CSELR_DEFAULT) /*!< Default remap position for DMA1 */
Kojto 93:e188a91d3eaa 141 #define HAL_DMA1_CH4_TIM7_UP (uint32_t) (DMA1_CHANNEL4_RMP | DMA1_CSELR_CH4_TIM7_UP) /*!< Remap TIM7 up on DMA1 channel 4 */
Kojto 93:e188a91d3eaa 142 #if !defined(STM32F030xC)
Kojto 93:e188a91d3eaa 143 #define HAL_DMA1_CH4_DAC_CH2 (uint32_t) (DMA1_CHANNEL4_RMP | DMA1_CSELR_CH4_DAC_CH2) /*!< Remap DAC Channel 2 on DMA1 channel 4 */
Kojto 93:e188a91d3eaa 144 #endif /* !defined(STM32F030xC) */
Kojto 93:e188a91d3eaa 145 #define HAL_DMA1_CH4_I2C2_TX (uint32_t) (DMA1_CHANNEL4_RMP | DMA1_CSELR_CH4_I2C2_TX) /*!< Remap I2C2 Tx on DMA1 channel 4 */
Kojto 93:e188a91d3eaa 146 #define HAL_DMA1_CH4_SPI2_RX (uint32_t) (DMA1_CHANNEL4_RMP | DMA1_CSELR_CH4_SPI2_RX) /*!< Remap SPI2 Rx on DMA1 channel 4 */
Kojto 93:e188a91d3eaa 147 #if !defined(STM32F030xC)
Kojto 93:e188a91d3eaa 148 #define HAL_DMA1_CH4_TIM2_CH4 (uint32_t) (DMA1_CHANNEL4_RMP | DMA1_CSELR_CH4_TIM2_CH4) /*!< Remap TIM2 channel 4 on DMA1 channel 4 */
Kojto 93:e188a91d3eaa 149 #endif /* !defined(STM32F030xC) */
Kojto 93:e188a91d3eaa 150 #define HAL_DMA1_CH4_TIM3_CH1 (uint32_t) (DMA1_CHANNEL4_RMP | DMA1_CSELR_CH4_TIM3_CH1) /*!< Remap TIM3 channel 1 on DMA1 channel 4 */
Kojto 93:e188a91d3eaa 151 #define HAL_DMA1_CH4_TIM3_TRIG (uint32_t) (DMA1_CHANNEL4_RMP | DMA1_CSELR_CH4_TIM3_TRIG) /*!< Remap TIM3 Trig on DMA1 channel 4 */
Kojto 93:e188a91d3eaa 152 #define HAL_DMA1_CH4_TIM16_CH1 (uint32_t) (DMA1_CHANNEL4_RMP | DMA1_CSELR_CH4_TIM16_CH1) /*!< Remap TIM16 channel 1 on DMA1 channel 4 */
Kojto 93:e188a91d3eaa 153 #define HAL_DMA1_CH4_TIM16_UP (uint32_t) (DMA1_CHANNEL4_RMP | DMA1_CSELR_CH4_TIM16_UP) /*!< Remap TIM16 up on DMA1 channel 4 */
Kojto 93:e188a91d3eaa 154 #define HAL_DMA1_CH4_USART1_TX (uint32_t) (DMA1_CHANNEL4_RMP | DMA1_CSELR_CH4_USART1_TX) /*!< Remap USART1 Tx on DMA1 channel 4 */
Kojto 93:e188a91d3eaa 155 #define HAL_DMA1_CH4_USART2_TX (uint32_t) (DMA1_CHANNEL4_RMP | DMA1_CSELR_CH4_USART2_TX) /*!< Remap USART2 Tx on DMA1 channel 4 */
Kojto 93:e188a91d3eaa 156 #define HAL_DMA1_CH4_USART3_TX (uint32_t) (DMA1_CHANNEL4_RMP | DMA1_CSELR_CH4_USART3_TX) /*!< Remap USART3 Tx on DMA1 channel 4 */
Kojto 93:e188a91d3eaa 157 #define HAL_DMA1_CH4_USART4_TX (uint32_t) (DMA1_CHANNEL4_RMP | DMA1_CSELR_CH4_USART4_TX) /*!< Remap USART4 Tx on DMA1 channel 4 */
Kojto 93:e188a91d3eaa 158 #define HAL_DMA1_CH4_USART5_TX (uint32_t) (DMA1_CHANNEL4_RMP | DMA1_CSELR_CH4_USART5_TX) /*!< Remap USART5 Tx on DMA1 channel 4 */
Kojto 93:e188a91d3eaa 159 #define HAL_DMA1_CH4_USART6_TX (uint32_t) (DMA1_CHANNEL4_RMP | DMA1_CSELR_CH4_USART6_TX) /*!< Remap USART6 Tx on DMA1 channel 4 */
Kojto 93:e188a91d3eaa 160 #if !defined(STM32F030xC)
Kojto 93:e188a91d3eaa 161 #define HAL_DMA1_CH4_USART7_TX (uint32_t) (DMA1_CHANNEL4_RMP | DMA1_CSELR_CH4_USART7_TX) /*!< Remap USART7 Tx on DMA1 channel 4 */
Kojto 93:e188a91d3eaa 162 #define HAL_DMA1_CH4_USART8_TX (uint32_t) (DMA1_CHANNEL4_RMP | DMA1_CSELR_CH4_USART8_TX) /*!< Remap USART8 Tx on DMA1 channel 4 */
Kojto 93:e188a91d3eaa 163 #endif /* !defined(STM32F030xC) */
Kojto 93:e188a91d3eaa 164
Kojto 90:cb3d968589d8 165 /* DMA1 - Channel 5 */
Kojto 93:e188a91d3eaa 166 #define HAL_DMA1_CH5_DEFAULT (uint32_t) (DMA1_CHANNEL5_RMP | DMA1_CSELR_DEFAULT) /*!< Default remap position for DMA1 */
Kojto 93:e188a91d3eaa 167 #define HAL_DMA1_CH5_I2C2_RX (uint32_t) (DMA1_CHANNEL5_RMP | DMA1_CSELR_CH5_I2C2_RX) /*!< Remap I2C2 Rx on DMA1 channel 5 */
Kojto 93:e188a91d3eaa 168 #define HAL_DMA1_CH5_SPI2_TX (uint32_t) (DMA1_CHANNEL5_RMP | DMA1_CSELR_CH5_SPI2_TX) /*!< Remap SPI1 Tx on DMA1 channel 5 */
Kojto 93:e188a91d3eaa 169 #define HAL_DMA1_CH5_TIM1_CH3 (uint32_t) (DMA1_CHANNEL5_RMP | DMA1_CSELR_CH5_TIM1_CH3) /*!< Remap TIM1 channel 3 on DMA1 channel 5 */
Kojto 93:e188a91d3eaa 170 #define HAL_DMA1_CH5_USART1_RX (uint32_t) (DMA1_CHANNEL5_RMP | DMA1_CSELR_CH5_USART1_RX) /*!< Remap USART1 Rx on DMA1 channel 5 */
Kojto 93:e188a91d3eaa 171 #define HAL_DMA1_CH5_USART2_RX (uint32_t) (DMA1_CHANNEL5_RMP | DMA1_CSELR_CH5_USART2_RX) /*!< Remap USART2 Rx on DMA1 channel 5 */
Kojto 93:e188a91d3eaa 172 #define HAL_DMA1_CH5_USART3_RX (uint32_t) (DMA1_CHANNEL5_RMP | DMA1_CSELR_CH5_USART3_RX) /*!< Remap USART3 Rx on DMA1 channel 5 */
Kojto 93:e188a91d3eaa 173 #define HAL_DMA1_CH5_USART4_RX (uint32_t) (DMA1_CHANNEL5_RMP | DMA1_CSELR_CH5_USART4_RX) /*!< Remap USART4 Rx on DMA1 channel 5 */
Kojto 93:e188a91d3eaa 174 #define HAL_DMA1_CH5_USART5_RX (uint32_t) (DMA1_CHANNEL5_RMP | DMA1_CSELR_CH5_USART5_RX) /*!< Remap USART5 Rx on DMA1 channel 5 */
Kojto 93:e188a91d3eaa 175 #define HAL_DMA1_CH5_USART6_RX (uint32_t) (DMA1_CHANNEL5_RMP | DMA1_CSELR_CH5_USART6_RX) /*!< Remap USART6 Rx on DMA1 channel 5 */
Kojto 93:e188a91d3eaa 176 #if !defined(STM32F030xC)
Kojto 93:e188a91d3eaa 177 #define HAL_DMA1_CH5_USART7_RX (uint32_t) (DMA1_CHANNEL5_RMP | DMA1_CSELR_CH5_USART7_RX) /*!< Remap USART7 Rx on DMA1 channel 5 */
Kojto 93:e188a91d3eaa 178 #define HAL_DMA1_CH5_USART8_RX (uint32_t) (DMA1_CHANNEL5_RMP | DMA1_CSELR_CH5_USART8_RX) /*!< Remap USART8 Rx on DMA1 channel 5 */
Kojto 93:e188a91d3eaa 179 #endif /* !defined(STM32F030xC) */
Kojto 93:e188a91d3eaa 180
Kojto 93:e188a91d3eaa 181 #if !defined(STM32F030xC)
Kojto 90:cb3d968589d8 182 /* DMA1 - Channel 6 */
Kojto 93:e188a91d3eaa 183 #define HAL_DMA1_CH6_DEFAULT (uint32_t) (DMA1_CHANNEL6_RMP | DMA1_CSELR_DEFAULT) /*!< Default remap position for DMA1 */
Kojto 93:e188a91d3eaa 184 #define HAL_DMA1_CH6_I2C1_TX (uint32_t) (DMA1_CHANNEL6_RMP | DMA1_CSELR_CH6_I2C1_TX) /*!< Remap I2C1 Tx on DMA1 channel 6 */
Kojto 93:e188a91d3eaa 185 #define HAL_DMA1_CH6_SPI2_RX (uint32_t) (DMA1_CHANNEL6_RMP | DMA1_CSELR_CH6_SPI2_RX) /*!< Remap SPI2 Rx on DMA1 channel 6 */
Kojto 93:e188a91d3eaa 186 #define HAL_DMA1_CH6_TIM1_CH1 (uint32_t) (DMA1_CHANNEL6_RMP | DMA1_CSELR_CH6_TIM1_CH1) /*!< Remap TIM1 channel 1 on DMA1 channel 6 */
Kojto 93:e188a91d3eaa 187 #define HAL_DMA1_CH6_TIM1_CH2 (uint32_t) (DMA1_CHANNEL6_RMP | DMA1_CSELR_CH6_TIM1_CH2) /*!< Remap TIM1 channel 2 on DMA1 channel 6 */
Kojto 93:e188a91d3eaa 188 #define HAL_DMA1_CH6_TIM1_CH3 (uint32_t) (DMA1_CHANNEL6_RMP | DMA1_CSELR_CH6_TIM1_CH3) /*!< Remap TIM1 channel 3 on DMA1 channel 6 */
Kojto 93:e188a91d3eaa 189 #define HAL_DMA1_CH6_TIM3_CH1 (uint32_t) (DMA1_CHANNEL6_RMP | DMA1_CSELR_CH6_TIM3_CH1) /*!< Remap TIM3 channel 1 on DMA1 channel 6 */
Kojto 93:e188a91d3eaa 190 #define HAL_DMA1_CH6_TIM3_TRIG (uint32_t) (DMA1_CHANNEL6_RMP | DMA1_CSELR_CH6_TIM3_TRIG) /*!< Remap TIM3 Trig on DMA1 channel 6 */
Kojto 93:e188a91d3eaa 191 #define HAL_DMA1_CH6_TIM16_CH1 (uint32_t) (DMA1_CHANNEL6_RMP | DMA1_CSELR_CH6_TIM16_CH1) /*!< Remap TIM16 channel 1 on DMA1 channel 6 */
Kojto 93:e188a91d3eaa 192 #define HAL_DMA1_CH6_TIM16_UP (uint32_t) (DMA1_CHANNEL6_RMP | DMA1_CSELR_CH6_TIM16_UP) /*!< Remap TIM16 up on DMA1 channel 6 */
Kojto 93:e188a91d3eaa 193 #define HAL_DMA1_CH6_USART1_RX (uint32_t) (DMA1_CHANNEL6_RMP | DMA1_CSELR_CH6_USART1_RX) /*!< Remap USART1 Rx on DMA1 channel 6 */
Kojto 93:e188a91d3eaa 194 #define HAL_DMA1_CH6_USART2_RX (uint32_t) (DMA1_CHANNEL6_RMP | DMA1_CSELR_CH6_USART2_RX) /*!< Remap USART2 Rx on DMA1 channel 6 */
Kojto 93:e188a91d3eaa 195 #define HAL_DMA1_CH6_USART3_RX (uint32_t) (DMA1_CHANNEL6_RMP | DMA1_CSELR_CH6_USART3_RX) /*!< Remap USART3 Rx on DMA1 channel 6 */
Kojto 93:e188a91d3eaa 196 #define HAL_DMA1_CH6_USART4_RX (uint32_t) (DMA1_CHANNEL6_RMP | DMA1_CSELR_CH6_USART4_RX) /*!< Remap USART4 Rx on DMA1 channel 6 */
Kojto 93:e188a91d3eaa 197 #define HAL_DMA1_CH6_USART5_RX (uint32_t) (DMA1_CHANNEL6_RMP | DMA1_CSELR_CH6_USART5_RX) /*!< Remap USART5 Rx on DMA1 channel 6 */
Kojto 93:e188a91d3eaa 198 #define HAL_DMA1_CH6_USART6_RX (uint32_t) (DMA1_CHANNEL6_RMP | DMA1_CSELR_CH6_USART6_RX) /*!< Remap USART6 Rx on DMA1 channel 6 */
Kojto 93:e188a91d3eaa 199 #define HAL_DMA1_CH6_USART7_RX (uint32_t) (DMA1_CHANNEL6_RMP | DMA1_CSELR_CH6_USART7_RX) /*!< Remap USART7 Rx on DMA1 channel 6 */
Kojto 93:e188a91d3eaa 200 #define HAL_DMA1_CH6_USART8_RX (uint32_t) (DMA1_CHANNEL6_RMP | DMA1_CSELR_CH6_USART8_RX) /*!< Remap USART8 Rx on DMA1 channel 6 */
Kojto 90:cb3d968589d8 201 /* DMA1 - Channel 7 */
Kojto 93:e188a91d3eaa 202 #define HAL_DMA1_CH7_DEFAULT (uint32_t) (DMA1_CHANNEL7_RMP | DMA1_CSELR_DEFAULT) /*!< Default remap position for DMA1 */
Kojto 93:e188a91d3eaa 203 #define HAL_DMA1_CH7_I2C1_RX (uint32_t) (DMA1_CHANNEL7_RMP | DMA1_CSELR_CH7_I2C1_RX) /*!< Remap I2C1 Rx on DMA1 channel 7 */
Kojto 93:e188a91d3eaa 204 #define HAL_DMA1_CH7_SPI2_TX (uint32_t) (DMA1_CHANNEL7_RMP | DMA1_CSELR_CH7_SPI2_TX) /*!< Remap SPI2 Tx on DMA1 channel 7 */
Kojto 93:e188a91d3eaa 205 #define HAL_DMA1_CH7_TIM2_CH2 (uint32_t) (DMA1_CHANNEL7_RMP | DMA1_CSELR_CH7_TIM2_CH2) /*!< Remap TIM2 channel 2 on DMA1 channel 7 */
Kojto 93:e188a91d3eaa 206 #define HAL_DMA1_CH7_TIM2_CH4 (uint32_t) (DMA1_CHANNEL7_RMP | DMA1_CSELR_CH7_TIM2_CH4) /*!< Remap TIM2 channel 4 on DMA1 channel 7 */
Kojto 93:e188a91d3eaa 207 #define HAL_DMA1_CH7_TIM17_CH1 (uint32_t) (DMA1_CHANNEL7_RMP | DMA1_CSELR_CH7_TIM17_CH1) /*!< Remap TIM17 channel 1 on DMA1 channel 7 */
Kojto 93:e188a91d3eaa 208 #define HAL_DMA1_CH7_TIM17_UP (uint32_t) (DMA1_CHANNEL7_RMP | DMA1_CSELR_CH7_TIM17_UP) /*!< Remap TIM17 up on DMA1 channel 7 */
Kojto 93:e188a91d3eaa 209 #define HAL_DMA1_CH7_USART1_TX (uint32_t) (DMA1_CHANNEL7_RMP | DMA1_CSELR_CH7_USART1_TX) /*!< Remap USART1 Tx on DMA1 channel 7 */
Kojto 93:e188a91d3eaa 210 #define HAL_DMA1_CH7_USART2_TX (uint32_t) (DMA1_CHANNEL7_RMP | DMA1_CSELR_CH7_USART2_TX) /*!< Remap USART2 Tx on DMA1 channel 7 */
Kojto 93:e188a91d3eaa 211 #define HAL_DMA1_CH7_USART3_TX (uint32_t) (DMA1_CHANNEL7_RMP | DMA1_CSELR_CH7_USART3_TX) /*!< Remap USART3 Tx on DMA1 channel 7 */
Kojto 93:e188a91d3eaa 212 #define HAL_DMA1_CH7_USART4_TX (uint32_t) (DMA1_CHANNEL7_RMP | DMA1_CSELR_CH7_USART4_TX) /*!< Remap USART4 Tx on DMA1 channel 7 */
Kojto 93:e188a91d3eaa 213 #define HAL_DMA1_CH7_USART5_TX (uint32_t) (DMA1_CHANNEL7_RMP | DMA1_CSELR_CH7_USART5_TX) /*!< Remap USART5 Tx on DMA1 channel 7 */
Kojto 93:e188a91d3eaa 214 #define HAL_DMA1_CH7_USART6_TX (uint32_t) (DMA1_CHANNEL7_RMP | DMA1_CSELR_CH7_USART6_TX) /*!< Remap USART6 Tx on DMA1 channel 7 */
Kojto 93:e188a91d3eaa 215 #define HAL_DMA1_CH7_USART7_TX (uint32_t) (DMA1_CHANNEL7_RMP | DMA1_CSELR_CH7_USART7_TX) /*!< Remap USART7 Tx on DMA1 channel 7 */
Kojto 93:e188a91d3eaa 216 #define HAL_DMA1_CH7_USART8_TX (uint32_t) (DMA1_CHANNEL7_RMP | DMA1_CSELR_CH7_USART8_TX) /*!< Remap USART8 Tx on DMA1 channel 7 */
Kojto 90:cb3d968589d8 217
Kojto 90:cb3d968589d8 218 /****************** DMA2 remap bit field definition********************/
Kojto 90:cb3d968589d8 219 /* DMA2 - Channel 1 */
Kojto 93:e188a91d3eaa 220 #define HAL_DMA2_CH1_DEFAULT (uint32_t) (DMA2_CHANNEL1_RMP | DMA2_CSELR_DEFAULT) /*!< Default remap position for DMA2 */
Kojto 93:e188a91d3eaa 221 #define HAL_DMA2_CH1_I2C2_TX (uint32_t) (DMA2_CHANNEL1_RMP | DMA2_CSELR_CH1_I2C2_TX) /*!< Remap I2C2 TX on DMA2 channel 1 */
Kojto 93:e188a91d3eaa 222 #define HAL_DMA2_CH1_USART1_TX (uint32_t) (DMA2_CHANNEL1_RMP | DMA2_CSELR_CH1_USART1_TX) /*!< Remap USART1 Tx on DMA2 channel 1 */
Kojto 93:e188a91d3eaa 223 #define HAL_DMA2_CH1_USART2_TX (uint32_t) (DMA2_CHANNEL1_RMP | DMA2_CSELR_CH1_USART2_TX) /*!< Remap USART2 Tx on DMA2 channel 1 */
Kojto 93:e188a91d3eaa 224 #define HAL_DMA2_CH1_USART3_TX (uint32_t) (DMA2_CHANNEL1_RMP | DMA2_CSELR_CH1_USART3_TX) /*!< Remap USART3 Tx on DMA2 channel 1 */
Kojto 93:e188a91d3eaa 225 #define HAL_DMA2_CH1_USART4_TX (uint32_t) (DMA2_CHANNEL1_RMP | DMA2_CSELR_CH1_USART4_TX) /*!< Remap USART4 Tx on DMA2 channel 1 */
Kojto 93:e188a91d3eaa 226 #define HAL_DMA2_CH1_USART5_TX (uint32_t) (DMA2_CHANNEL1_RMP | DMA2_CSELR_CH1_USART5_TX) /*!< Remap USART5 Tx on DMA2 channel 1 */
Kojto 93:e188a91d3eaa 227 #define HAL_DMA2_CH1_USART6_TX (uint32_t) (DMA2_CHANNEL1_RMP | DMA2_CSELR_CH1_USART6_TX) /*!< Remap USART6 Tx on DMA2 channel 1 */
Kojto 93:e188a91d3eaa 228 #define HAL_DMA2_CH1_USART7_TX (uint32_t) (DMA2_CHANNEL1_RMP | DMA2_CSELR_CH1_USART7_TX) /*!< Remap USART7 Tx on DMA2 channel 1 */
Kojto 93:e188a91d3eaa 229 #define HAL_DMA2_CH1_USART8_TX (uint32_t) (DMA2_CHANNEL1_RMP | DMA2_CSELR_CH1_USART8_TX) /*!< Remap USART8 Tx on DMA2 channel 1 */
Kojto 90:cb3d968589d8 230 /* DMA2 - Channel 2 */
Kojto 93:e188a91d3eaa 231 #define HAL_DMA2_CH2_DEFAULT (uint32_t) (DMA2_CHANNEL2_RMP | DMA2_CSELR_DEFAULT) /*!< Default remap position for DMA2 */
Kojto 93:e188a91d3eaa 232 #define HAL_DMA2_CH2_I2C2_RX (uint32_t) (DMA2_CHANNEL2_RMP | DMA2_CSELR_CH2_I2C2_RX) /*!< Remap I2C2 Rx on DMA2 channel 2 */
Kojto 93:e188a91d3eaa 233 #define HAL_DMA2_CH2_USART1_RX (uint32_t) (DMA2_CHANNEL2_RMP | DMA2_CSELR_CH2_USART1_RX) /*!< Remap USART1 Rx on DMA2 channel 2 */
Kojto 93:e188a91d3eaa 234 #define HAL_DMA2_CH2_USART2_RX (uint32_t) (DMA2_CHANNEL2_RMP | DMA2_CSELR_CH2_USART2_RX) /*!< Remap USART2 Rx on DMA2 channel 2 */
Kojto 93:e188a91d3eaa 235 #define HAL_DMA2_CH2_USART3_RX (uint32_t) (DMA2_CHANNEL2_RMP | DMA2_CSELR_CH2_USART3_RX) /*!< Remap USART3 Rx on DMA2 channel 2 */
Kojto 93:e188a91d3eaa 236 #define HAL_DMA2_CH2_USART4_RX (uint32_t) (DMA2_CHANNEL2_RMP | DMA2_CSELR_CH2_USART4_RX) /*!< Remap USART4 Rx on DMA2 channel 2 */
Kojto 93:e188a91d3eaa 237 #define HAL_DMA2_CH2_USART5_RX (uint32_t) (DMA2_CHANNEL2_RMP | DMA2_CSELR_CH2_USART5_RX) /*!< Remap USART5 Rx on DMA2 channel 2 */
Kojto 93:e188a91d3eaa 238 #define HAL_DMA2_CH2_USART6_RX (uint32_t) (DMA2_CHANNEL2_RMP | DMA2_CSELR_CH2_USART6_RX) /*!< Remap USART6 Rx on DMA2 channel 2 */
Kojto 93:e188a91d3eaa 239 #define HAL_DMA2_CH2_USART7_RX (uint32_t) (DMA2_CHANNEL2_RMP | DMA2_CSELR_CH2_USART7_RX) /*!< Remap USART7 Rx on DMA2 channel 2 */
Kojto 93:e188a91d3eaa 240 #define HAL_DMA2_CH2_USART8_RX (uint32_t) (DMA2_CHANNEL2_RMP | DMA2_CSELR_CH2_USART8_RX) /*!< Remap USART8 Rx on DMA2 channel 2 */
Kojto 90:cb3d968589d8 241 /* DMA2 - Channel 3 */
Kojto 93:e188a91d3eaa 242 #define HAL_DMA2_CH3_DEFAULT (uint32_t) (DMA2_CHANNEL3_RMP | DMA2_CSELR_DEFAULT) /*!< Default remap position for DMA2 */
Kojto 93:e188a91d3eaa 243 #define HAL_DMA2_CH3_TIM6_UP (uint32_t) (DMA2_CHANNEL3_RMP | DMA2_CSELR_CH3_TIM6_UP) /*!< Remap TIM6 up on DMA2 channel 3 */
Kojto 93:e188a91d3eaa 244 #define HAL_DMA2_CH3_DAC_CH1 (uint32_t) (DMA2_CHANNEL3_RMP | DMA2_CSELR_CH3_DAC_CH1) /*!< Remap DAC channel 1 on DMA2 channel 3 */
Kojto 93:e188a91d3eaa 245 #define HAL_DMA2_CH3_SPI1_RX (uint32_t) (DMA2_CHANNEL3_RMP | DMA2_CSELR_CH3_SPI1_RX) /*!< Remap SPI1 Rx on DMA2 channel 3 */
Kojto 93:e188a91d3eaa 246 #define HAL_DMA2_CH3_USART1_RX (uint32_t) (DMA2_CHANNEL3_RMP | DMA2_CSELR_CH3_USART1_RX) /*!< Remap USART1 Rx on DMA2 channel 3 */
Kojto 93:e188a91d3eaa 247 #define HAL_DMA2_CH3_USART2_RX (uint32_t) (DMA2_CHANNEL3_RMP | DMA2_CSELR_CH3_USART2_RX) /*!< Remap USART2 Rx on DMA2 channel 3 */
Kojto 93:e188a91d3eaa 248 #define HAL_DMA2_CH3_USART3_RX (uint32_t) (DMA2_CHANNEL3_RMP | DMA2_CSELR_CH3_USART3_RX) /*!< Remap USART3 Rx on DMA2 channel 3 */
Kojto 93:e188a91d3eaa 249 #define HAL_DMA2_CH3_USART4_RX (uint32_t) (DMA2_CHANNEL3_RMP | DMA2_CSELR_CH3_USART4_RX) /*!< Remap USART4 Rx on DMA2 channel 3 */
Kojto 93:e188a91d3eaa 250 #define HAL_DMA2_CH3_USART5_RX (uint32_t) (DMA2_CHANNEL3_RMP | DMA2_CSELR_CH3_USART5_RX) /*!< Remap USART5 Rx on DMA2 channel 3 */
Kojto 93:e188a91d3eaa 251 #define HAL_DMA2_CH3_USART6_RX (uint32_t) (DMA2_CHANNEL3_RMP | DMA2_CSELR_CH3_USART6_RX) /*!< Remap USART6 Rx on DMA2 channel 3 */
Kojto 93:e188a91d3eaa 252 #define HAL_DMA2_CH3_USART7_RX (uint32_t) (DMA2_CHANNEL3_RMP | DMA2_CSELR_CH3_USART7_RX) /*!< Remap USART7 Rx on DMA2 channel 3 */
Kojto 93:e188a91d3eaa 253 #define HAL_DMA2_CH3_USART8_RX (uint32_t) (DMA2_CHANNEL3_RMP | DMA2_CSELR_CH3_USART8_RX) /*!< Remap USART8 Rx on DMA2 channel 3 */
Kojto 90:cb3d968589d8 254 /* DMA2 - Channel 4 */
Kojto 93:e188a91d3eaa 255 #define HAL_DMA2_CH4_DEFAULT (uint32_t) (DMA2_CHANNEL4_RMP | DMA2_CSELR_DEFAULT) /*!< Default remap position for DMA2 */
Kojto 93:e188a91d3eaa 256 #define HAL_DMA2_CH4_TIM7_UP (uint32_t) (DMA2_CHANNEL4_RMP | DMA2_CSELR_CH4_TIM7_UP) /*!< Remap TIM7 up on DMA2 channel 4 */
Kojto 93:e188a91d3eaa 257 #define HAL_DMA2_CH4_DAC_CH2 (uint32_t) (DMA2_CHANNEL4_RMP | DMA2_CSELR_CH4_DAC_CH2) /*!< Remap DAC channel 2 on DMA2 channel 4 */
Kojto 93:e188a91d3eaa 258 #define HAL_DMA2_CH4_SPI1_TX (uint32_t) (DMA2_CHANNEL4_RMP | DMA2_CSELR_CH4_SPI1_TX) /*!< Remap SPI1 Tx on DMA2 channel 4 */
Kojto 93:e188a91d3eaa 259 #define HAL_DMA2_CH4_USART1_TX (uint32_t) (DMA2_CHANNEL4_RMP | DMA2_CSELR_CH4_USART1_TX) /*!< Remap USART1 Tx on DMA2 channel 4 */
Kojto 93:e188a91d3eaa 260 #define HAL_DMA2_CH4_USART2_TX (uint32_t) (DMA2_CHANNEL4_RMP | DMA2_CSELR_CH4_USART2_TX) /*!< Remap USART2 Tx on DMA2 channel 4 */
Kojto 93:e188a91d3eaa 261 #define HAL_DMA2_CH4_USART3_TX (uint32_t) (DMA2_CHANNEL4_RMP | DMA2_CSELR_CH4_USART3_TX) /*!< Remap USART3 Tx on DMA2 channel 4 */
Kojto 93:e188a91d3eaa 262 #define HAL_DMA2_CH4_USART4_TX (uint32_t) (DMA2_CHANNEL4_RMP | DMA2_CSELR_CH4_USART4_TX) /*!< Remap USART4 Tx on DMA2 channel 4 */
Kojto 93:e188a91d3eaa 263 #define HAL_DMA2_CH4_USART5_TX (uint32_t) (DMA2_CHANNEL4_RMP | DMA2_CSELR_CH4_USART5_TX) /*!< Remap USART5 Tx on DMA2 channel 4 */
Kojto 93:e188a91d3eaa 264 #define HAL_DMA2_CH4_USART6_TX (uint32_t) (DMA2_CHANNEL4_RMP | DMA2_CSELR_CH4_USART6_TX) /*!< Remap USART6 Tx on DMA2 channel 4 */
Kojto 93:e188a91d3eaa 265 #define HAL_DMA2_CH4_USART7_TX (uint32_t) (DMA2_CHANNEL4_RMP | DMA2_CSELR_CH4_USART7_TX) /*!< Remap USART7 Tx on DMA2 channel 4 */
Kojto 93:e188a91d3eaa 266 #define HAL_DMA2_CH4_USART8_TX (uint32_t) (DMA2_CHANNEL4_RMP | DMA2_CSELR_CH4_USART8_TX) /*!< Remap USART8 Tx on DMA2 channel 4 */
Kojto 90:cb3d968589d8 267 /* DMA2 - Channel 5 */
Kojto 93:e188a91d3eaa 268 #define HAL_DMA2_CH5_DEFAULT (uint32_t) (DMA2_CHANNEL5_RMP | DMA2_CSELR_DEFAULT) /*!< Default remap position for DMA2 */
Kojto 93:e188a91d3eaa 269 #define HAL_DMA2_CH5_ADC (uint32_t) (DMA2_CHANNEL5_RMP | DMA2_CSELR_CH5_ADC) /*!< Remap ADC on DMA2 channel 5 */
Kojto 93:e188a91d3eaa 270 #define HAL_DMA2_CH5_USART1_TX (uint32_t) (DMA2_CHANNEL5_RMP | DMA2_CSELR_CH5_USART1_TX) /*!< Remap USART1 Tx on DMA2 channel 5 */
Kojto 93:e188a91d3eaa 271 #define HAL_DMA2_CH5_USART2_TX (uint32_t) (DMA2_CHANNEL5_RMP | DMA2_CSELR_CH5_USART2_TX) /*!< Remap USART2 Tx on DMA2 channel 5 */
Kojto 93:e188a91d3eaa 272 #define HAL_DMA2_CH5_USART3_TX (uint32_t) (DMA2_CHANNEL5_RMP | DMA2_CSELR_CH5_USART3_TX) /*!< Remap USART3 Tx on DMA2 channel 5 */
Kojto 93:e188a91d3eaa 273 #define HAL_DMA2_CH5_USART4_TX (uint32_t) (DMA2_CHANNEL5_RMP | DMA2_CSELR_CH5_USART4_TX) /*!< Remap USART4 Tx on DMA2 channel 5 */
Kojto 93:e188a91d3eaa 274 #define HAL_DMA2_CH5_USART5_TX (uint32_t) (DMA2_CHANNEL5_RMP | DMA2_CSELR_CH5_USART5_TX) /*!< Remap USART5 Tx on DMA2 channel 5 */
Kojto 93:e188a91d3eaa 275 #define HAL_DMA2_CH5_USART6_TX (uint32_t) (DMA2_CHANNEL5_RMP | DMA2_CSELR_CH5_USART6_TX) /*!< Remap USART6 Tx on DMA2 channel 5 */
Kojto 93:e188a91d3eaa 276 #define HAL_DMA2_CH5_USART7_TX (uint32_t) (DMA2_CHANNEL5_RMP | DMA2_CSELR_CH5_USART7_TX) /*!< Remap USART7 Tx on DMA2 channel 5 */
Kojto 93:e188a91d3eaa 277 #define HAL_DMA2_CH5_USART8_TX (uint32_t) (DMA2_CHANNEL5_RMP | DMA2_CSELR_CH5_USART8_TX) /*!< Remap USART8 Tx on DMA2 channel 5 */
Kojto 93:e188a91d3eaa 278 #endif /* !defined(STM32F030xC) */
Kojto 90:cb3d968589d8 279
Kojto 93:e188a91d3eaa 280 #if defined(STM32F091xC) || defined(STM32F098xx)
Kojto 93:e188a91d3eaa 281 #define IS_HAL_DMA1_REMAP(REQUEST) (((REQUEST) == HAL_DMA1_CH1_DEFAULT) ||\
Kojto 90:cb3d968589d8 282 ((REQUEST) == HAL_DMA1_CH1_ADC) ||\
Kojto 90:cb3d968589d8 283 ((REQUEST) == HAL_DMA1_CH1_TIM17_CH1) ||\
Kojto 90:cb3d968589d8 284 ((REQUEST) == HAL_DMA1_CH1_TIM17_UP) ||\
Kojto 90:cb3d968589d8 285 ((REQUEST) == HAL_DMA1_CH1_USART1_RX) ||\
Kojto 90:cb3d968589d8 286 ((REQUEST) == HAL_DMA1_CH1_USART2_RX) ||\
Kojto 90:cb3d968589d8 287 ((REQUEST) == HAL_DMA1_CH1_USART3_RX) ||\
Kojto 90:cb3d968589d8 288 ((REQUEST) == HAL_DMA1_CH1_USART4_RX) ||\
Kojto 90:cb3d968589d8 289 ((REQUEST) == HAL_DMA1_CH1_USART5_RX) ||\
Kojto 90:cb3d968589d8 290 ((REQUEST) == HAL_DMA1_CH1_USART6_RX) ||\
Kojto 90:cb3d968589d8 291 ((REQUEST) == HAL_DMA1_CH1_USART7_RX) ||\
Kojto 90:cb3d968589d8 292 ((REQUEST) == HAL_DMA1_CH1_USART8_RX) ||\
Kojto 90:cb3d968589d8 293 ((REQUEST) == HAL_DMA1_CH2_DEFAULT) ||\
Kojto 90:cb3d968589d8 294 ((REQUEST) == HAL_DMA1_CH2_ADC) ||\
Kojto 90:cb3d968589d8 295 ((REQUEST) == HAL_DMA1_CH2_I2C1_TX) ||\
Kojto 90:cb3d968589d8 296 ((REQUEST) == HAL_DMA1_CH2_SPI1_RX) ||\
Kojto 90:cb3d968589d8 297 ((REQUEST) == HAL_DMA1_CH2_TIM1_CH1) ||\
Kojto 90:cb3d968589d8 298 ((REQUEST) == HAL_DMA1_CH2_I2C1_TX) ||\
Kojto 90:cb3d968589d8 299 ((REQUEST) == HAL_DMA1_CH2_TIM17_CH1) ||\
Kojto 90:cb3d968589d8 300 ((REQUEST) == HAL_DMA1_CH2_TIM17_UP) ||\
Kojto 90:cb3d968589d8 301 ((REQUEST) == HAL_DMA1_CH2_USART1_TX) ||\
Kojto 90:cb3d968589d8 302 ((REQUEST) == HAL_DMA1_CH2_USART2_TX) ||\
Kojto 90:cb3d968589d8 303 ((REQUEST) == HAL_DMA1_CH2_USART3_TX) ||\
Kojto 90:cb3d968589d8 304 ((REQUEST) == HAL_DMA1_CH2_USART4_TX) ||\
Kojto 90:cb3d968589d8 305 ((REQUEST) == HAL_DMA1_CH2_USART5_TX) ||\
Kojto 90:cb3d968589d8 306 ((REQUEST) == HAL_DMA1_CH2_USART6_TX) ||\
Kojto 90:cb3d968589d8 307 ((REQUEST) == HAL_DMA1_CH2_USART7_TX) ||\
Kojto 90:cb3d968589d8 308 ((REQUEST) == HAL_DMA1_CH2_USART8_TX) ||\
Kojto 90:cb3d968589d8 309 ((REQUEST) == HAL_DMA1_CH3_DEFAULT) ||\
Kojto 90:cb3d968589d8 310 ((REQUEST) == HAL_DMA1_CH3_TIM6_UP) ||\
Kojto 90:cb3d968589d8 311 ((REQUEST) == HAL_DMA1_CH3_DAC_CH1) ||\
Kojto 90:cb3d968589d8 312 ((REQUEST) == HAL_DMA1_CH3_I2C1_RX) ||\
Kojto 90:cb3d968589d8 313 ((REQUEST) == HAL_DMA1_CH3_SPI1_TX) ||\
Kojto 90:cb3d968589d8 314 ((REQUEST) == HAL_DMA1_CH3_TIM1_CH2) ||\
Kojto 90:cb3d968589d8 315 ((REQUEST) == HAL_DMA1_CH3_TIM2_CH2) ||\
Kojto 90:cb3d968589d8 316 ((REQUEST) == HAL_DMA1_CH3_TIM16_CH1) ||\
Kojto 90:cb3d968589d8 317 ((REQUEST) == HAL_DMA1_CH3_TIM16_UP) ||\
Kojto 90:cb3d968589d8 318 ((REQUEST) == HAL_DMA1_CH3_USART1_RX) ||\
Kojto 90:cb3d968589d8 319 ((REQUEST) == HAL_DMA1_CH3_USART2_RX) ||\
Kojto 90:cb3d968589d8 320 ((REQUEST) == HAL_DMA1_CH3_USART3_RX) ||\
Kojto 90:cb3d968589d8 321 ((REQUEST) == HAL_DMA1_CH3_USART4_RX) ||\
Kojto 90:cb3d968589d8 322 ((REQUEST) == HAL_DMA1_CH3_USART5_RX) ||\
Kojto 90:cb3d968589d8 323 ((REQUEST) == HAL_DMA1_CH3_USART6_RX) ||\
Kojto 90:cb3d968589d8 324 ((REQUEST) == HAL_DMA1_CH3_USART7_RX) ||\
Kojto 90:cb3d968589d8 325 ((REQUEST) == HAL_DMA1_CH3_USART8_RX) ||\
Kojto 90:cb3d968589d8 326 ((REQUEST) == HAL_DMA1_CH4_DEFAULT) ||\
Kojto 90:cb3d968589d8 327 ((REQUEST) == HAL_DMA1_CH4_TIM7_UP) ||\
Kojto 90:cb3d968589d8 328 ((REQUEST) == HAL_DMA1_CH4_DAC_CH2) ||\
Kojto 90:cb3d968589d8 329 ((REQUEST) == HAL_DMA1_CH4_I2C2_TX) ||\
Kojto 90:cb3d968589d8 330 ((REQUEST) == HAL_DMA1_CH4_SPI2_RX) ||\
Kojto 90:cb3d968589d8 331 ((REQUEST) == HAL_DMA1_CH4_TIM2_CH4) ||\
Kojto 90:cb3d968589d8 332 ((REQUEST) == HAL_DMA1_CH4_TIM3_CH1) ||\
Kojto 90:cb3d968589d8 333 ((REQUEST) == HAL_DMA1_CH4_TIM3_TRIG) ||\
Kojto 90:cb3d968589d8 334 ((REQUEST) == HAL_DMA1_CH4_TIM16_CH1) ||\
Kojto 90:cb3d968589d8 335 ((REQUEST) == HAL_DMA1_CH4_TIM16_UP) ||\
Kojto 90:cb3d968589d8 336 ((REQUEST) == HAL_DMA1_CH4_USART1_TX) ||\
Kojto 90:cb3d968589d8 337 ((REQUEST) == HAL_DMA1_CH4_USART2_TX) ||\
Kojto 90:cb3d968589d8 338 ((REQUEST) == HAL_DMA1_CH4_USART3_TX) ||\
Kojto 90:cb3d968589d8 339 ((REQUEST) == HAL_DMA1_CH4_USART4_TX) ||\
Kojto 90:cb3d968589d8 340 ((REQUEST) == HAL_DMA1_CH4_USART5_TX) ||\
Kojto 90:cb3d968589d8 341 ((REQUEST) == HAL_DMA1_CH4_USART6_TX) ||\
Kojto 90:cb3d968589d8 342 ((REQUEST) == HAL_DMA1_CH4_USART7_TX) ||\
Kojto 90:cb3d968589d8 343 ((REQUEST) == HAL_DMA1_CH4_USART8_TX) ||\
Kojto 90:cb3d968589d8 344 ((REQUEST) == HAL_DMA1_CH5_DEFAULT) ||\
Kojto 90:cb3d968589d8 345 ((REQUEST) == HAL_DMA1_CH5_I2C2_RX) ||\
Kojto 90:cb3d968589d8 346 ((REQUEST) == HAL_DMA1_CH5_SPI2_TX) ||\
Kojto 90:cb3d968589d8 347 ((REQUEST) == HAL_DMA1_CH5_TIM1_CH3) ||\
Kojto 90:cb3d968589d8 348 ((REQUEST) == HAL_DMA1_CH5_USART1_RX) ||\
Kojto 90:cb3d968589d8 349 ((REQUEST) == HAL_DMA1_CH5_USART2_RX) ||\
Kojto 90:cb3d968589d8 350 ((REQUEST) == HAL_DMA1_CH5_USART3_RX) ||\
Kojto 90:cb3d968589d8 351 ((REQUEST) == HAL_DMA1_CH5_USART4_RX) ||\
Kojto 90:cb3d968589d8 352 ((REQUEST) == HAL_DMA1_CH5_USART5_RX) ||\
Kojto 90:cb3d968589d8 353 ((REQUEST) == HAL_DMA1_CH5_USART6_RX) ||\
Kojto 90:cb3d968589d8 354 ((REQUEST) == HAL_DMA1_CH5_USART7_RX) ||\
Kojto 90:cb3d968589d8 355 ((REQUEST) == HAL_DMA1_CH5_USART8_RX) ||\
Kojto 90:cb3d968589d8 356 ((REQUEST) == HAL_DMA1_CH6_DEFAULT) ||\
Kojto 90:cb3d968589d8 357 ((REQUEST) == HAL_DMA1_CH6_I2C1_TX) ||\
Kojto 90:cb3d968589d8 358 ((REQUEST) == HAL_DMA1_CH6_SPI2_RX) ||\
Kojto 90:cb3d968589d8 359 ((REQUEST) == HAL_DMA1_CH6_TIM1_CH1) ||\
Kojto 90:cb3d968589d8 360 ((REQUEST) == HAL_DMA1_CH6_TIM1_CH2) ||\
Kojto 90:cb3d968589d8 361 ((REQUEST) == HAL_DMA1_CH6_TIM1_CH3) ||\
Kojto 90:cb3d968589d8 362 ((REQUEST) == HAL_DMA1_CH6_TIM3_CH1) ||\
Kojto 90:cb3d968589d8 363 ((REQUEST) == HAL_DMA1_CH6_TIM3_TRIG) ||\
Kojto 90:cb3d968589d8 364 ((REQUEST) == HAL_DMA1_CH6_TIM16_CH1) ||\
Kojto 90:cb3d968589d8 365 ((REQUEST) == HAL_DMA1_CH6_TIM16_UP) ||\
Kojto 90:cb3d968589d8 366 ((REQUEST) == HAL_DMA1_CH6_USART1_RX) ||\
Kojto 90:cb3d968589d8 367 ((REQUEST) == HAL_DMA1_CH6_USART2_RX) ||\
Kojto 90:cb3d968589d8 368 ((REQUEST) == HAL_DMA1_CH6_USART3_RX) ||\
Kojto 90:cb3d968589d8 369 ((REQUEST) == HAL_DMA1_CH6_USART4_RX) ||\
Kojto 90:cb3d968589d8 370 ((REQUEST) == HAL_DMA1_CH6_USART5_RX) ||\
Kojto 90:cb3d968589d8 371 ((REQUEST) == HAL_DMA1_CH6_USART6_RX) ||\
Kojto 90:cb3d968589d8 372 ((REQUEST) == HAL_DMA1_CH6_USART7_RX) ||\
Kojto 90:cb3d968589d8 373 ((REQUEST) == HAL_DMA1_CH6_USART8_RX) ||\
Kojto 90:cb3d968589d8 374 ((REQUEST) == HAL_DMA1_CH7_DEFAULT) ||\
Kojto 90:cb3d968589d8 375 ((REQUEST) == HAL_DMA1_CH7_I2C1_RX) ||\
Kojto 90:cb3d968589d8 376 ((REQUEST) == HAL_DMA1_CH7_SPI2_TX) ||\
Kojto 90:cb3d968589d8 377 ((REQUEST) == HAL_DMA1_CH7_TIM2_CH2) ||\
Kojto 90:cb3d968589d8 378 ((REQUEST) == HAL_DMA1_CH7_TIM2_CH4) ||\
Kojto 90:cb3d968589d8 379 ((REQUEST) == HAL_DMA1_CH7_TIM17_CH1) ||\
Kojto 90:cb3d968589d8 380 ((REQUEST) == HAL_DMA1_CH7_TIM17_UP) ||\
Kojto 90:cb3d968589d8 381 ((REQUEST) == HAL_DMA1_CH7_USART1_TX) ||\
Kojto 90:cb3d968589d8 382 ((REQUEST) == HAL_DMA1_CH7_USART2_TX) ||\
Kojto 90:cb3d968589d8 383 ((REQUEST) == HAL_DMA1_CH7_USART3_TX) ||\
Kojto 90:cb3d968589d8 384 ((REQUEST) == HAL_DMA1_CH7_USART4_TX) ||\
Kojto 90:cb3d968589d8 385 ((REQUEST) == HAL_DMA1_CH7_USART5_TX) ||\
Kojto 90:cb3d968589d8 386 ((REQUEST) == HAL_DMA1_CH7_USART6_TX) ||\
Kojto 90:cb3d968589d8 387 ((REQUEST) == HAL_DMA1_CH7_USART7_TX) ||\
Kojto 90:cb3d968589d8 388 ((REQUEST) == HAL_DMA1_CH7_USART8_TX))
Kojto 90:cb3d968589d8 389
Kojto 90:cb3d968589d8 390 #define IS_HAL_DMA2_REMAP(REQUEST) (((REQUEST) == HAL_DMA2_CH1_DEFAULT) ||\
Kojto 90:cb3d968589d8 391 ((REQUEST) == HAL_DMA2_CH1_I2C2_TX) ||\
Kojto 90:cb3d968589d8 392 ((REQUEST) == HAL_DMA2_CH1_USART1_TX) ||\
Kojto 90:cb3d968589d8 393 ((REQUEST) == HAL_DMA2_CH1_USART2_TX) ||\
Kojto 90:cb3d968589d8 394 ((REQUEST) == HAL_DMA2_CH1_USART3_TX) ||\
Kojto 90:cb3d968589d8 395 ((REQUEST) == HAL_DMA2_CH1_USART4_TX) ||\
Kojto 90:cb3d968589d8 396 ((REQUEST) == HAL_DMA2_CH1_USART5_TX) ||\
Kojto 90:cb3d968589d8 397 ((REQUEST) == HAL_DMA2_CH1_USART6_TX) ||\
Kojto 90:cb3d968589d8 398 ((REQUEST) == HAL_DMA2_CH1_USART7_TX) ||\
Kojto 90:cb3d968589d8 399 ((REQUEST) == HAL_DMA2_CH1_USART8_TX) ||\
Kojto 90:cb3d968589d8 400 ((REQUEST) == HAL_DMA2_CH2_DEFAULT) ||\
Kojto 90:cb3d968589d8 401 ((REQUEST) == HAL_DMA2_CH2_I2C2_RX) ||\
Kojto 90:cb3d968589d8 402 ((REQUEST) == HAL_DMA2_CH2_USART1_RX) ||\
Kojto 90:cb3d968589d8 403 ((REQUEST) == HAL_DMA2_CH2_USART2_RX) ||\
Kojto 90:cb3d968589d8 404 ((REQUEST) == HAL_DMA2_CH2_USART3_RX) ||\
Kojto 90:cb3d968589d8 405 ((REQUEST) == HAL_DMA2_CH2_USART4_RX) ||\
Kojto 90:cb3d968589d8 406 ((REQUEST) == HAL_DMA2_CH2_USART5_RX) ||\
Kojto 90:cb3d968589d8 407 ((REQUEST) == HAL_DMA2_CH2_USART6_RX) ||\
Kojto 90:cb3d968589d8 408 ((REQUEST) == HAL_DMA2_CH2_USART7_RX) ||\
Kojto 90:cb3d968589d8 409 ((REQUEST) == HAL_DMA2_CH2_USART8_RX) ||\
Kojto 90:cb3d968589d8 410 ((REQUEST) == HAL_DMA2_CH3_DEFAULT) ||\
Kojto 90:cb3d968589d8 411 ((REQUEST) == HAL_DMA2_CH3_TIM6_UP) ||\
Kojto 90:cb3d968589d8 412 ((REQUEST) == HAL_DMA2_CH3_DAC_CH1) ||\
Kojto 90:cb3d968589d8 413 ((REQUEST) == HAL_DMA2_CH3_SPI1_RX) ||\
Kojto 90:cb3d968589d8 414 ((REQUEST) == HAL_DMA2_CH3_USART1_RX) ||\
Kojto 90:cb3d968589d8 415 ((REQUEST) == HAL_DMA2_CH3_USART2_RX) ||\
Kojto 90:cb3d968589d8 416 ((REQUEST) == HAL_DMA2_CH3_USART3_RX) ||\
Kojto 90:cb3d968589d8 417 ((REQUEST) == HAL_DMA2_CH3_USART4_RX) ||\
Kojto 90:cb3d968589d8 418 ((REQUEST) == HAL_DMA2_CH3_USART5_RX) ||\
Kojto 90:cb3d968589d8 419 ((REQUEST) == HAL_DMA2_CH3_USART6_RX) ||\
Kojto 90:cb3d968589d8 420 ((REQUEST) == HAL_DMA2_CH3_USART7_RX) ||\
Kojto 90:cb3d968589d8 421 ((REQUEST) == HAL_DMA2_CH3_USART8_RX) ||\
Kojto 90:cb3d968589d8 422 ((REQUEST) == HAL_DMA2_CH4_DEFAULT) ||\
Kojto 90:cb3d968589d8 423 ((REQUEST) == HAL_DMA2_CH4_TIM7_UP) ||\
Kojto 90:cb3d968589d8 424 ((REQUEST) == HAL_DMA2_CH4_DAC_CH2) ||\
Kojto 90:cb3d968589d8 425 ((REQUEST) == HAL_DMA2_CH4_SPI1_TX) ||\
Kojto 90:cb3d968589d8 426 ((REQUEST) == HAL_DMA2_CH4_USART1_TX) ||\
Kojto 90:cb3d968589d8 427 ((REQUEST) == HAL_DMA2_CH4_USART2_TX) ||\
Kojto 90:cb3d968589d8 428 ((REQUEST) == HAL_DMA2_CH4_USART3_TX) ||\
Kojto 90:cb3d968589d8 429 ((REQUEST) == HAL_DMA2_CH4_USART4_TX) ||\
Kojto 90:cb3d968589d8 430 ((REQUEST) == HAL_DMA2_CH4_USART5_TX) ||\
Kojto 90:cb3d968589d8 431 ((REQUEST) == HAL_DMA2_CH4_USART6_TX) ||\
Kojto 90:cb3d968589d8 432 ((REQUEST) == HAL_DMA2_CH4_USART7_TX) ||\
Kojto 90:cb3d968589d8 433 ((REQUEST) == HAL_DMA2_CH4_USART8_TX) ||\
Kojto 90:cb3d968589d8 434 ((REQUEST) == HAL_DMA2_CH5_DEFAULT) ||\
Kojto 90:cb3d968589d8 435 ((REQUEST) == HAL_DMA2_CH5_ADC) ||\
Kojto 90:cb3d968589d8 436 ((REQUEST) == HAL_DMA2_CH5_USART1_TX) ||\
Kojto 90:cb3d968589d8 437 ((REQUEST) == HAL_DMA2_CH5_USART2_TX) ||\
Kojto 90:cb3d968589d8 438 ((REQUEST) == HAL_DMA2_CH5_USART3_TX) ||\
Kojto 90:cb3d968589d8 439 ((REQUEST) == HAL_DMA2_CH5_USART4_TX) ||\
Kojto 90:cb3d968589d8 440 ((REQUEST) == HAL_DMA2_CH5_USART5_TX) ||\
Kojto 90:cb3d968589d8 441 ((REQUEST) == HAL_DMA2_CH5_USART6_TX) ||\
Kojto 90:cb3d968589d8 442 ((REQUEST) == HAL_DMA2_CH5_USART7_TX) ||\
Kojto 90:cb3d968589d8 443 ((REQUEST) == HAL_DMA2_CH5_USART8_TX ))
Kojto 93:e188a91d3eaa 444 #endif /* STM32F091xC || STM32F098xx */
Kojto 93:e188a91d3eaa 445
Kojto 93:e188a91d3eaa 446 #if defined(STM32F030xC)
Kojto 93:e188a91d3eaa 447 #define IS_HAL_DMA1_REMAP(REQUEST) (((REQUEST) == HAL_DMA1_CH1_DEFAULT) ||\
Kojto 93:e188a91d3eaa 448 ((REQUEST) == HAL_DMA1_CH1_ADC) ||\
Kojto 93:e188a91d3eaa 449 ((REQUEST) == HAL_DMA1_CH1_TIM17_CH1) ||\
Kojto 93:e188a91d3eaa 450 ((REQUEST) == HAL_DMA1_CH1_TIM17_UP) ||\
Kojto 93:e188a91d3eaa 451 ((REQUEST) == HAL_DMA1_CH1_USART1_RX) ||\
Kojto 93:e188a91d3eaa 452 ((REQUEST) == HAL_DMA1_CH1_USART2_RX) ||\
Kojto 93:e188a91d3eaa 453 ((REQUEST) == HAL_DMA1_CH1_USART3_RX) ||\
Kojto 93:e188a91d3eaa 454 ((REQUEST) == HAL_DMA1_CH1_USART4_RX) ||\
Kojto 93:e188a91d3eaa 455 ((REQUEST) == HAL_DMA1_CH1_USART5_RX) ||\
Kojto 93:e188a91d3eaa 456 ((REQUEST) == HAL_DMA1_CH1_USART6_RX) ||\
Kojto 93:e188a91d3eaa 457 ((REQUEST) == HAL_DMA1_CH2_DEFAULT) ||\
Kojto 93:e188a91d3eaa 458 ((REQUEST) == HAL_DMA1_CH2_ADC) ||\
Kojto 93:e188a91d3eaa 459 ((REQUEST) == HAL_DMA1_CH2_I2C1_TX) ||\
Kojto 93:e188a91d3eaa 460 ((REQUEST) == HAL_DMA1_CH2_SPI1_RX) ||\
Kojto 93:e188a91d3eaa 461 ((REQUEST) == HAL_DMA1_CH2_TIM1_CH1) ||\
Kojto 93:e188a91d3eaa 462 ((REQUEST) == HAL_DMA1_CH2_I2C1_TX) ||\
Kojto 93:e188a91d3eaa 463 ((REQUEST) == HAL_DMA1_CH2_TIM17_CH1) ||\
Kojto 93:e188a91d3eaa 464 ((REQUEST) == HAL_DMA1_CH2_TIM17_UP) ||\
Kojto 93:e188a91d3eaa 465 ((REQUEST) == HAL_DMA1_CH2_USART1_TX) ||\
Kojto 93:e188a91d3eaa 466 ((REQUEST) == HAL_DMA1_CH2_USART2_TX) ||\
Kojto 93:e188a91d3eaa 467 ((REQUEST) == HAL_DMA1_CH2_USART3_TX) ||\
Kojto 93:e188a91d3eaa 468 ((REQUEST) == HAL_DMA1_CH2_USART4_TX) ||\
Kojto 93:e188a91d3eaa 469 ((REQUEST) == HAL_DMA1_CH2_USART5_TX) ||\
Kojto 93:e188a91d3eaa 470 ((REQUEST) == HAL_DMA1_CH2_USART6_TX) ||\
Kojto 93:e188a91d3eaa 471 ((REQUEST) == HAL_DMA1_CH3_DEFAULT) ||\
Kojto 93:e188a91d3eaa 472 ((REQUEST) == HAL_DMA1_CH3_TIM6_UP) ||\
Kojto 93:e188a91d3eaa 473 ((REQUEST) == HAL_DMA1_CH3_I2C1_RX) ||\
Kojto 93:e188a91d3eaa 474 ((REQUEST) == HAL_DMA1_CH3_SPI1_TX) ||\
Kojto 93:e188a91d3eaa 475 ((REQUEST) == HAL_DMA1_CH3_TIM1_CH2) ||\
Kojto 93:e188a91d3eaa 476 ((REQUEST) == HAL_DMA1_CH3_TIM16_CH1) ||\
Kojto 93:e188a91d3eaa 477 ((REQUEST) == HAL_DMA1_CH3_TIM16_UP) ||\
Kojto 93:e188a91d3eaa 478 ((REQUEST) == HAL_DMA1_CH3_USART1_RX) ||\
Kojto 93:e188a91d3eaa 479 ((REQUEST) == HAL_DMA1_CH3_USART2_RX) ||\
Kojto 93:e188a91d3eaa 480 ((REQUEST) == HAL_DMA1_CH3_USART3_RX) ||\
Kojto 93:e188a91d3eaa 481 ((REQUEST) == HAL_DMA1_CH3_USART4_RX) ||\
Kojto 93:e188a91d3eaa 482 ((REQUEST) == HAL_DMA1_CH3_USART5_RX) ||\
Kojto 93:e188a91d3eaa 483 ((REQUEST) == HAL_DMA1_CH3_USART6_RX) ||\
Kojto 93:e188a91d3eaa 484 ((REQUEST) == HAL_DMA1_CH4_DEFAULT) ||\
Kojto 93:e188a91d3eaa 485 ((REQUEST) == HAL_DMA1_CH4_TIM7_UP) ||\
Kojto 93:e188a91d3eaa 486 ((REQUEST) == HAL_DMA1_CH4_I2C2_TX) ||\
Kojto 93:e188a91d3eaa 487 ((REQUEST) == HAL_DMA1_CH4_SPI2_RX) ||\
Kojto 93:e188a91d3eaa 488 ((REQUEST) == HAL_DMA1_CH4_TIM3_CH1) ||\
Kojto 93:e188a91d3eaa 489 ((REQUEST) == HAL_DMA1_CH4_TIM3_TRIG) ||\
Kojto 93:e188a91d3eaa 490 ((REQUEST) == HAL_DMA1_CH4_TIM16_CH1) ||\
Kojto 93:e188a91d3eaa 491 ((REQUEST) == HAL_DMA1_CH4_TIM16_UP) ||\
Kojto 93:e188a91d3eaa 492 ((REQUEST) == HAL_DMA1_CH4_USART1_TX) ||\
Kojto 93:e188a91d3eaa 493 ((REQUEST) == HAL_DMA1_CH4_USART2_TX) ||\
Kojto 93:e188a91d3eaa 494 ((REQUEST) == HAL_DMA1_CH4_USART3_TX) ||\
Kojto 93:e188a91d3eaa 495 ((REQUEST) == HAL_DMA1_CH4_USART4_TX) ||\
Kojto 93:e188a91d3eaa 496 ((REQUEST) == HAL_DMA1_CH4_USART5_TX) ||\
Kojto 93:e188a91d3eaa 497 ((REQUEST) == HAL_DMA1_CH4_USART6_TX) ||\
Kojto 93:e188a91d3eaa 498 ((REQUEST) == HAL_DMA1_CH5_DEFAULT) ||\
Kojto 93:e188a91d3eaa 499 ((REQUEST) == HAL_DMA1_CH5_I2C2_RX) ||\
Kojto 93:e188a91d3eaa 500 ((REQUEST) == HAL_DMA1_CH5_SPI2_TX) ||\
Kojto 93:e188a91d3eaa 501 ((REQUEST) == HAL_DMA1_CH5_TIM1_CH3) ||\
Kojto 93:e188a91d3eaa 502 ((REQUEST) == HAL_DMA1_CH5_USART1_RX) ||\
Kojto 93:e188a91d3eaa 503 ((REQUEST) == HAL_DMA1_CH5_USART2_RX) ||\
Kojto 93:e188a91d3eaa 504 ((REQUEST) == HAL_DMA1_CH5_USART3_RX) ||\
Kojto 93:e188a91d3eaa 505 ((REQUEST) == HAL_DMA1_CH5_USART4_RX) ||\
Kojto 93:e188a91d3eaa 506 ((REQUEST) == HAL_DMA1_CH5_USART5_RX) ||\
Kojto 93:e188a91d3eaa 507 ((REQUEST) == HAL_DMA1_CH5_USART6_RX))
Kojto 93:e188a91d3eaa 508 #endif /* STM32F030xC */
Kojto 93:e188a91d3eaa 509
Kojto 90:cb3d968589d8 510 /**
Kojto 90:cb3d968589d8 511 * @}
Kojto 90:cb3d968589d8 512 */
Kojto 93:e188a91d3eaa 513 #endif /* STM32F091xC || STM32F098xx || STM32F030xC */
Kojto 90:cb3d968589d8 514
Kojto 90:cb3d968589d8 515 /* Exported macros -----------------------------------------------------------*/
Kojto 90:cb3d968589d8 516
Kojto 90:cb3d968589d8 517 /** @defgroup DMAEx_Exported_Macros DMAEx Exported Macros
Kojto 90:cb3d968589d8 518 * @{
Kojto 90:cb3d968589d8 519 */
Kojto 90:cb3d968589d8 520 /* Interrupt & Flag management */
Kojto 90:cb3d968589d8 521
Kojto 90:cb3d968589d8 522 #if defined(STM32F071xB) || defined(STM32F072xB) || defined(STM32F078xx)
Kojto 90:cb3d968589d8 523 /**
Kojto 90:cb3d968589d8 524 * @brief Returns the current DMA Channel transfer complete flag.
Kojto 90:cb3d968589d8 525 * @param __HANDLE__: DMA handle
Kojto 90:cb3d968589d8 526 * @retval The specified transfer complete flag index.
Kojto 90:cb3d968589d8 527 */
Kojto 90:cb3d968589d8 528 #define __HAL_DMA_GET_TC_FLAG_INDEX(__HANDLE__) \
Kojto 90:cb3d968589d8 529 (((uint32_t)((__HANDLE__)->Instance) == ((uint32_t)DMA1_Channel1))? DMA_FLAG_TC1 :\
Kojto 90:cb3d968589d8 530 ((uint32_t)((__HANDLE__)->Instance) == ((uint32_t)DMA1_Channel2))? DMA_FLAG_TC2 :\
Kojto 90:cb3d968589d8 531 ((uint32_t)((__HANDLE__)->Instance) == ((uint32_t)DMA1_Channel3))? DMA_FLAG_TC3 :\
Kojto 90:cb3d968589d8 532 ((uint32_t)((__HANDLE__)->Instance) == ((uint32_t)DMA1_Channel4))? DMA_FLAG_TC4 :\
Kojto 90:cb3d968589d8 533 ((uint32_t)((__HANDLE__)->Instance) == ((uint32_t)DMA1_Channel5))? DMA_FLAG_TC5 :\
Kojto 90:cb3d968589d8 534 ((uint32_t)((__HANDLE__)->Instance) == ((uint32_t)DMA1_Channel6))? DMA_FLAG_TC6 :\
Kojto 90:cb3d968589d8 535 DMA_FLAG_TC7)
Kojto 90:cb3d968589d8 536
Kojto 90:cb3d968589d8 537 /**
Kojto 90:cb3d968589d8 538 * @brief Returns the current DMA Channel half transfer complete flag.
Kojto 90:cb3d968589d8 539 * @param __HANDLE__: DMA handle
Kojto 90:cb3d968589d8 540 * @retval The specified half transfer complete flag index.
Kojto 90:cb3d968589d8 541 */
Kojto 90:cb3d968589d8 542 #define __HAL_DMA_GET_HT_FLAG_INDEX(__HANDLE__)\
Kojto 90:cb3d968589d8 543 (((uint32_t)((__HANDLE__)->Instance) == ((uint32_t)DMA1_Channel1))? DMA_FLAG_HT1 :\
Kojto 90:cb3d968589d8 544 ((uint32_t)((__HANDLE__)->Instance) == ((uint32_t)DMA1_Channel2))? DMA_FLAG_HT2 :\
Kojto 90:cb3d968589d8 545 ((uint32_t)((__HANDLE__)->Instance) == ((uint32_t)DMA1_Channel3))? DMA_FLAG_HT3 :\
Kojto 90:cb3d968589d8 546 ((uint32_t)((__HANDLE__)->Instance) == ((uint32_t)DMA1_Channel4))? DMA_FLAG_HT4 :\
Kojto 90:cb3d968589d8 547 ((uint32_t)((__HANDLE__)->Instance) == ((uint32_t)DMA1_Channel5))? DMA_FLAG_HT5 :\
Kojto 90:cb3d968589d8 548 ((uint32_t)((__HANDLE__)->Instance) == ((uint32_t)DMA1_Channel6))? DMA_FLAG_HT6 :\
Kojto 90:cb3d968589d8 549 DMA_FLAG_HT7)
Kojto 90:cb3d968589d8 550
Kojto 90:cb3d968589d8 551 /**
Kojto 90:cb3d968589d8 552 * @brief Returns the current DMA Channel transfer error flag.
Kojto 90:cb3d968589d8 553 * @param __HANDLE__: DMA handle
Kojto 90:cb3d968589d8 554 * @retval The specified transfer error flag index.
Kojto 90:cb3d968589d8 555 */
Kojto 90:cb3d968589d8 556 #define __HAL_DMA_GET_TE_FLAG_INDEX(__HANDLE__)\
Kojto 90:cb3d968589d8 557 (((uint32_t)((__HANDLE__)->Instance) == ((uint32_t)DMA1_Channel1))? DMA_FLAG_TE1 :\
Kojto 90:cb3d968589d8 558 ((uint32_t)((__HANDLE__)->Instance) == ((uint32_t)DMA1_Channel2))? DMA_FLAG_TE2 :\
Kojto 90:cb3d968589d8 559 ((uint32_t)((__HANDLE__)->Instance) == ((uint32_t)DMA1_Channel3))? DMA_FLAG_TE3 :\
Kojto 90:cb3d968589d8 560 ((uint32_t)((__HANDLE__)->Instance) == ((uint32_t)DMA1_Channel4))? DMA_FLAG_TE4 :\
Kojto 90:cb3d968589d8 561 ((uint32_t)((__HANDLE__)->Instance) == ((uint32_t)DMA1_Channel5))? DMA_FLAG_TE5 :\
Kojto 90:cb3d968589d8 562 ((uint32_t)((__HANDLE__)->Instance) == ((uint32_t)DMA1_Channel6))? DMA_FLAG_TE6 :\
Kojto 90:cb3d968589d8 563 DMA_FLAG_TE7)
Kojto 90:cb3d968589d8 564
Kojto 90:cb3d968589d8 565 /**
Kojto 90:cb3d968589d8 566 * @brief Get the DMA Channel pending flags.
Kojto 90:cb3d968589d8 567 * @param __HANDLE__: DMA handle
Kojto 90:cb3d968589d8 568 * @param __FLAG__: Get the specified flag.
Kojto 90:cb3d968589d8 569 * This parameter can be any combination of the following values:
Kojto 93:e188a91d3eaa 570 * @arg DMA_FLAG_TCx: Transfer complete flag
Kojto 93:e188a91d3eaa 571 * @arg DMA_FLAG_HTx: Half transfer complete flag
Kojto 93:e188a91d3eaa 572 * @arg DMA_FLAG_TEx: Transfer error flag
Kojto 90:cb3d968589d8 573 * Where x can be 1_7 to select the DMA Channel flag.
Kojto 90:cb3d968589d8 574 * @retval The state of FLAG (SET or RESET).
Kojto 90:cb3d968589d8 575 */
Kojto 90:cb3d968589d8 576
Kojto 90:cb3d968589d8 577 #define __HAL_DMA_GET_FLAG(__HANDLE__, __FLAG__) (DMA1->ISR & (__FLAG__))
Kojto 90:cb3d968589d8 578
Kojto 90:cb3d968589d8 579 /**
Kojto 90:cb3d968589d8 580 * @brief Clears the DMA Channel pending flags.
Kojto 90:cb3d968589d8 581 * @param __HANDLE__: DMA handle
Kojto 90:cb3d968589d8 582 * @param __FLAG__: specifies the flag to clear.
Kojto 90:cb3d968589d8 583 * This parameter can be any combination of the following values:
Kojto 93:e188a91d3eaa 584 * @arg DMA_FLAG_TCx: Transfer complete flag
Kojto 93:e188a91d3eaa 585 * @arg DMA_FLAG_HTx: Half transfer complete flag
Kojto 93:e188a91d3eaa 586 * @arg DMA_FLAG_TEx: Transfer error flag
Kojto 90:cb3d968589d8 587 * Where x can be 1_7 to select the DMA Channel flag.
Kojto 90:cb3d968589d8 588 * @retval None
Kojto 90:cb3d968589d8 589 */
Kojto 90:cb3d968589d8 590 #define __HAL_DMA_CLEAR_FLAG(__HANDLE__, __FLAG__) (DMA1->IFCR = (__FLAG__))
Kojto 90:cb3d968589d8 591
Kojto 90:cb3d968589d8 592 #elif defined(STM32F091xC) || defined(STM32F098xx)
Kojto 90:cb3d968589d8 593 /**
Kojto 90:cb3d968589d8 594 * @brief Returns the current DMA Channel transfer complete flag.
Kojto 90:cb3d968589d8 595 * @param __HANDLE__: DMA handle
Kojto 90:cb3d968589d8 596 * @retval The specified transfer complete flag index.
Kojto 90:cb3d968589d8 597 */
Kojto 90:cb3d968589d8 598 #define __HAL_DMA_GET_TC_FLAG_INDEX(__HANDLE__) \
Kojto 90:cb3d968589d8 599 (((uint32_t)((__HANDLE__)->Instance) == ((uint32_t)DMA1_Channel1))? DMA_FLAG_TC1 :\
Kojto 90:cb3d968589d8 600 ((uint32_t)((__HANDLE__)->Instance) == ((uint32_t)DMA1_Channel2))? DMA_FLAG_TC2 :\
Kojto 90:cb3d968589d8 601 ((uint32_t)((__HANDLE__)->Instance) == ((uint32_t)DMA1_Channel3))? DMA_FLAG_TC3 :\
Kojto 90:cb3d968589d8 602 ((uint32_t)((__HANDLE__)->Instance) == ((uint32_t)DMA1_Channel4))? DMA_FLAG_TC4 :\
Kojto 90:cb3d968589d8 603 ((uint32_t)((__HANDLE__)->Instance) == ((uint32_t)DMA1_Channel5))? DMA_FLAG_TC5 :\
Kojto 90:cb3d968589d8 604 ((uint32_t)((__HANDLE__)->Instance) == ((uint32_t)DMA1_Channel6))? DMA_FLAG_TC6 :\
Kojto 90:cb3d968589d8 605 ((uint32_t)((__HANDLE__)->Instance) == ((uint32_t)DMA1_Channel7))? DMA_FLAG_TC7 :\
Kojto 90:cb3d968589d8 606 ((uint32_t)((__HANDLE__)->Instance) == ((uint32_t)DMA2_Channel1))? DMA_FLAG_TC1 :\
Kojto 90:cb3d968589d8 607 ((uint32_t)((__HANDLE__)->Instance) == ((uint32_t)DMA2_Channel2))? DMA_FLAG_TC2 :\
Kojto 90:cb3d968589d8 608 ((uint32_t)((__HANDLE__)->Instance) == ((uint32_t)DMA2_Channel3))? DMA_FLAG_TC3 :\
Kojto 90:cb3d968589d8 609 ((uint32_t)((__HANDLE__)->Instance) == ((uint32_t)DMA2_Channel4))? DMA_FLAG_TC4 :\
Kojto 90:cb3d968589d8 610 DMA_FLAG_TC5)
Kojto 90:cb3d968589d8 611
Kojto 90:cb3d968589d8 612 /**
Kojto 90:cb3d968589d8 613 * @brief Returns the current DMA Channel half transfer complete flag.
Kojto 90:cb3d968589d8 614 * @param __HANDLE__: DMA handle
Kojto 90:cb3d968589d8 615 * @retval The specified half transfer complete flag index.
Kojto 90:cb3d968589d8 616 */
Kojto 90:cb3d968589d8 617 #define __HAL_DMA_GET_HT_FLAG_INDEX(__HANDLE__)\
Kojto 90:cb3d968589d8 618 (((uint32_t)((__HANDLE__)->Instance) == ((uint32_t)DMA1_Channel1))? DMA_FLAG_HT1 :\
Kojto 90:cb3d968589d8 619 ((uint32_t)((__HANDLE__)->Instance) == ((uint32_t)DMA1_Channel2))? DMA_FLAG_HT2 :\
Kojto 90:cb3d968589d8 620 ((uint32_t)((__HANDLE__)->Instance) == ((uint32_t)DMA1_Channel3))? DMA_FLAG_HT3 :\
Kojto 90:cb3d968589d8 621 ((uint32_t)((__HANDLE__)->Instance) == ((uint32_t)DMA1_Channel4))? DMA_FLAG_HT4 :\
Kojto 90:cb3d968589d8 622 ((uint32_t)((__HANDLE__)->Instance) == ((uint32_t)DMA1_Channel5))? DMA_FLAG_HT5 :\
Kojto 90:cb3d968589d8 623 ((uint32_t)((__HANDLE__)->Instance) == ((uint32_t)DMA1_Channel6))? DMA_FLAG_HT6 :\
Kojto 90:cb3d968589d8 624 ((uint32_t)((__HANDLE__)->Instance) == ((uint32_t)DMA1_Channel7))? DMA_FLAG_HT7 :\
Kojto 90:cb3d968589d8 625 ((uint32_t)((__HANDLE__)->Instance) == ((uint32_t)DMA2_Channel1))? DMA_FLAG_HT1 :\
Kojto 90:cb3d968589d8 626 ((uint32_t)((__HANDLE__)->Instance) == ((uint32_t)DMA2_Channel2))? DMA_FLAG_HT2 :\
Kojto 90:cb3d968589d8 627 ((uint32_t)((__HANDLE__)->Instance) == ((uint32_t)DMA2_Channel3))? DMA_FLAG_HT3 :\
Kojto 90:cb3d968589d8 628 ((uint32_t)((__HANDLE__)->Instance) == ((uint32_t)DMA2_Channel4))? DMA_FLAG_HT4 :\
Kojto 90:cb3d968589d8 629 DMA_FLAG_HT5)
Kojto 90:cb3d968589d8 630
Kojto 90:cb3d968589d8 631 /**
Kojto 90:cb3d968589d8 632 * @brief Returns the current DMA Channel transfer error flag.
Kojto 90:cb3d968589d8 633 * @param __HANDLE__: DMA handle
Kojto 90:cb3d968589d8 634 * @retval The specified transfer error flag index.
Kojto 90:cb3d968589d8 635 */
Kojto 90:cb3d968589d8 636 #define __HAL_DMA_GET_TE_FLAG_INDEX(__HANDLE__)\
Kojto 90:cb3d968589d8 637 (((uint32_t)((__HANDLE__)->Instance) == ((uint32_t)DMA1_Channel1))? DMA_FLAG_TE1 :\
Kojto 90:cb3d968589d8 638 ((uint32_t)((__HANDLE__)->Instance) == ((uint32_t)DMA1_Channel2))? DMA_FLAG_TE2 :\
Kojto 90:cb3d968589d8 639 ((uint32_t)((__HANDLE__)->Instance) == ((uint32_t)DMA1_Channel3))? DMA_FLAG_TE3 :\
Kojto 90:cb3d968589d8 640 ((uint32_t)((__HANDLE__)->Instance) == ((uint32_t)DMA1_Channel4))? DMA_FLAG_TE4 :\
Kojto 90:cb3d968589d8 641 ((uint32_t)((__HANDLE__)->Instance) == ((uint32_t)DMA1_Channel5))? DMA_FLAG_TE5 :\
Kojto 90:cb3d968589d8 642 ((uint32_t)((__HANDLE__)->Instance) == ((uint32_t)DMA1_Channel6))? DMA_FLAG_TE6 :\
Kojto 90:cb3d968589d8 643 ((uint32_t)((__HANDLE__)->Instance) == ((uint32_t)DMA1_Channel7))? DMA_FLAG_TE7 :\
Kojto 90:cb3d968589d8 644 ((uint32_t)((__HANDLE__)->Instance) == ((uint32_t)DMA2_Channel1))? DMA_FLAG_TE1 :\
Kojto 90:cb3d968589d8 645 ((uint32_t)((__HANDLE__)->Instance) == ((uint32_t)DMA2_Channel2))? DMA_FLAG_TE2 :\
Kojto 90:cb3d968589d8 646 ((uint32_t)((__HANDLE__)->Instance) == ((uint32_t)DMA2_Channel3))? DMA_FLAG_TE3 :\
Kojto 90:cb3d968589d8 647 ((uint32_t)((__HANDLE__)->Instance) == ((uint32_t)DMA2_Channel4))? DMA_FLAG_TE4 :\
Kojto 90:cb3d968589d8 648 DMA_FLAG_TE5)
Kojto 90:cb3d968589d8 649
Kojto 90:cb3d968589d8 650 /**
Kojto 90:cb3d968589d8 651 * @brief Get the DMA Channel pending flags.
Kojto 90:cb3d968589d8 652 * @param __HANDLE__: DMA handle
Kojto 90:cb3d968589d8 653 * @param __FLAG__: Get the specified flag.
Kojto 90:cb3d968589d8 654 * This parameter can be any combination of the following values:
Kojto 93:e188a91d3eaa 655 * @arg DMA_FLAG_TCx: Transfer complete flag
Kojto 93:e188a91d3eaa 656 * @arg DMA_FLAG_HTx: Half transfer complete flag
Kojto 93:e188a91d3eaa 657 * @arg DMA_FLAG_TEx: Transfer error flag
Kojto 90:cb3d968589d8 658 * Where x can be 0_4, 1_5, 2_6 or 3_7 to select the DMA Channel flag.
Kojto 90:cb3d968589d8 659 * @retval The state of FLAG (SET or RESET).
Kojto 90:cb3d968589d8 660 */
Kojto 90:cb3d968589d8 661
Kojto 90:cb3d968589d8 662 #define __HAL_DMA_GET_FLAG(__HANDLE__, __FLAG__)\
Kojto 90:cb3d968589d8 663 (((uint32_t)((__HANDLE__)->Instance) > (uint32_t)DMA1_Channel7)? (DMA2->ISR & (__FLAG__)) :\
Kojto 90:cb3d968589d8 664 (DMA1->ISR & (__FLAG__)))
Kojto 90:cb3d968589d8 665
Kojto 90:cb3d968589d8 666 /**
Kojto 90:cb3d968589d8 667 * @brief Clears the DMA Channel pending flags.
Kojto 90:cb3d968589d8 668 * @param __HANDLE__: DMA handle
Kojto 90:cb3d968589d8 669 * @param __FLAG__: specifies the flag to clear.
Kojto 90:cb3d968589d8 670 * This parameter can be any combination of the following values:
Kojto 93:e188a91d3eaa 671 * @arg DMA_FLAG_TCx: Transfer complete flag
Kojto 93:e188a91d3eaa 672 * @arg DMA_FLAG_HTx: Half transfer complete flag
Kojto 93:e188a91d3eaa 673 * @arg DMA_FLAG_TEx: Transfer error flag
Kojto 90:cb3d968589d8 674 * Where x can be 0_4, 1_5, 2_6 or 3_7 to select the DMA Channel flag.
Kojto 90:cb3d968589d8 675 * @retval None
Kojto 90:cb3d968589d8 676 */
Kojto 90:cb3d968589d8 677 #define __HAL_DMA_CLEAR_FLAG(__HANDLE__, __FLAG__) \
Kojto 90:cb3d968589d8 678 (((uint32_t)((__HANDLE__)->Instance) > (uint32_t)DMA1_Channel7)? (DMA2->IFCR = (__FLAG__)) :\
Kojto 90:cb3d968589d8 679 (DMA1->IFCR = (__FLAG__)))
Kojto 90:cb3d968589d8 680
Kojto 93:e188a91d3eaa 681 #else /* STM32F030x8_STM32F030xC_STM32F031x6_STM32F038xx_STM32F051x8_STM32F058xx_STM32F070x6_STM32F070xB Product devices */
Kojto 90:cb3d968589d8 682 /**
Kojto 90:cb3d968589d8 683 * @brief Returns the current DMA Channel transfer complete flag.
Kojto 90:cb3d968589d8 684 * @param __HANDLE__: DMA handle
Kojto 90:cb3d968589d8 685 * @retval The specified transfer complete flag index.
Kojto 90:cb3d968589d8 686 */
Kojto 90:cb3d968589d8 687 #define __HAL_DMA_GET_TC_FLAG_INDEX(__HANDLE__) \
Kojto 90:cb3d968589d8 688 (((uint32_t)((__HANDLE__)->Instance) == ((uint32_t)DMA1_Channel1))? DMA_FLAG_TC1 :\
Kojto 90:cb3d968589d8 689 ((uint32_t)((__HANDLE__)->Instance) == ((uint32_t)DMA1_Channel2))? DMA_FLAG_TC2 :\
Kojto 90:cb3d968589d8 690 ((uint32_t)((__HANDLE__)->Instance) == ((uint32_t)DMA1_Channel3))? DMA_FLAG_TC3 :\
Kojto 90:cb3d968589d8 691 ((uint32_t)((__HANDLE__)->Instance) == ((uint32_t)DMA1_Channel4))? DMA_FLAG_TC4 :\
Kojto 90:cb3d968589d8 692 DMA_FLAG_TC5)
Kojto 90:cb3d968589d8 693
Kojto 90:cb3d968589d8 694 /**
Kojto 90:cb3d968589d8 695 * @brief Returns the current DMA Channel half transfer complete flag.
Kojto 90:cb3d968589d8 696 * @param __HANDLE__: DMA handle
Kojto 90:cb3d968589d8 697 * @retval The specified half transfer complete flag index.
Kojto 90:cb3d968589d8 698 */
Kojto 90:cb3d968589d8 699 #define __HAL_DMA_GET_HT_FLAG_INDEX(__HANDLE__)\
Kojto 90:cb3d968589d8 700 (((uint32_t)((__HANDLE__)->Instance) == ((uint32_t)DMA1_Channel1))? DMA_FLAG_HT1 :\
Kojto 90:cb3d968589d8 701 ((uint32_t)((__HANDLE__)->Instance) == ((uint32_t)DMA1_Channel2))? DMA_FLAG_HT2 :\
Kojto 90:cb3d968589d8 702 ((uint32_t)((__HANDLE__)->Instance) == ((uint32_t)DMA1_Channel3))? DMA_FLAG_HT3 :\
Kojto 90:cb3d968589d8 703 ((uint32_t)((__HANDLE__)->Instance) == ((uint32_t)DMA1_Channel4))? DMA_FLAG_HT4 :\
Kojto 90:cb3d968589d8 704 DMA_FLAG_HT5)
Kojto 90:cb3d968589d8 705
Kojto 90:cb3d968589d8 706 /**
Kojto 90:cb3d968589d8 707 * @brief Returns the current DMA Channel transfer error flag.
Kojto 90:cb3d968589d8 708 * @param __HANDLE__: DMA handle
Kojto 90:cb3d968589d8 709 * @retval The specified transfer error flag index.
Kojto 90:cb3d968589d8 710 */
Kojto 90:cb3d968589d8 711 #define __HAL_DMA_GET_TE_FLAG_INDEX(__HANDLE__)\
Kojto 90:cb3d968589d8 712 (((uint32_t)((__HANDLE__)->Instance) == ((uint32_t)DMA1_Channel1))? DMA_FLAG_TE1 :\
Kojto 90:cb3d968589d8 713 ((uint32_t)((__HANDLE__)->Instance) == ((uint32_t)DMA1_Channel2))? DMA_FLAG_TE2 :\
Kojto 90:cb3d968589d8 714 ((uint32_t)((__HANDLE__)->Instance) == ((uint32_t)DMA1_Channel3))? DMA_FLAG_TE3 :\
Kojto 90:cb3d968589d8 715 ((uint32_t)((__HANDLE__)->Instance) == ((uint32_t)DMA1_Channel4))? DMA_FLAG_TE4 :\
Kojto 90:cb3d968589d8 716 DMA_FLAG_TE5)
Kojto 90:cb3d968589d8 717
Kojto 90:cb3d968589d8 718 /**
Kojto 90:cb3d968589d8 719 * @brief Get the DMA Channel pending flags.
Kojto 90:cb3d968589d8 720 * @param __HANDLE__: DMA handle
Kojto 90:cb3d968589d8 721 * @param __FLAG__: Get the specified flag.
Kojto 90:cb3d968589d8 722 * This parameter can be any combination of the following values:
Kojto 93:e188a91d3eaa 723 * @arg DMA_FLAG_TCx: Transfer complete flag
Kojto 93:e188a91d3eaa 724 * @arg DMA_FLAG_HTx: Half transfer complete flag
Kojto 93:e188a91d3eaa 725 * @arg DMA_FLAG_TEx: Transfer error flag
Kojto 90:cb3d968589d8 726 * Where x can be 1_5 to select the DMA Channel flag.
Kojto 90:cb3d968589d8 727 * @retval The state of FLAG (SET or RESET).
Kojto 90:cb3d968589d8 728 */
Kojto 90:cb3d968589d8 729
Kojto 90:cb3d968589d8 730 #define __HAL_DMA_GET_FLAG(__HANDLE__, __FLAG__) (DMA1->ISR & (__FLAG__))
Kojto 90:cb3d968589d8 731
Kojto 90:cb3d968589d8 732 /**
Kojto 90:cb3d968589d8 733 * @brief Clears the DMA Channel pending flags.
Kojto 90:cb3d968589d8 734 * @param __HANDLE__: DMA handle
Kojto 90:cb3d968589d8 735 * @param __FLAG__: specifies the flag to clear.
Kojto 90:cb3d968589d8 736 * This parameter can be any combination of the following values:
Kojto 93:e188a91d3eaa 737 * @arg DMA_FLAG_TCx: Transfer complete flag
Kojto 93:e188a91d3eaa 738 * @arg DMA_FLAG_HTx: Half transfer complete flag
Kojto 93:e188a91d3eaa 739 * @arg DMA_FLAG_TEx: Transfer error flag
Kojto 90:cb3d968589d8 740 * Where x can be 1_5 to select the DMA Channel flag.
Kojto 90:cb3d968589d8 741 * @retval None
Kojto 90:cb3d968589d8 742 */
Kojto 90:cb3d968589d8 743 #define __HAL_DMA_CLEAR_FLAG(__HANDLE__, __FLAG__) (DMA1->IFCR = (__FLAG__))
Kojto 90:cb3d968589d8 744
Kojto 90:cb3d968589d8 745 #endif
Kojto 90:cb3d968589d8 746
Kojto 90:cb3d968589d8 747
Kojto 93:e188a91d3eaa 748 #if defined(STM32F091xC) || defined(STM32F098xx) || defined(STM32F030xC)
Kojto 90:cb3d968589d8 749 #define __HAL_DMA1_REMAP(__REQUEST__) \
Kojto 90:cb3d968589d8 750 do { assert_param(IS_HAL_DMA1_REMAP(__REQUEST__)); \
Kojto 93:e188a91d3eaa 751 DMA1->CSELR &= ~((uint32_t)0x0F << (uint32_t)(((__REQUEST__) >> 28) * 4)); \
Kojto 93:e188a91d3eaa 752 DMA1->CSELR |= (uint32_t)((__REQUEST__) & 0x0FFFFFFF); \
Kojto 90:cb3d968589d8 753 }while(0)
Kojto 90:cb3d968589d8 754
Kojto 93:e188a91d3eaa 755 #if defined(STM32F091xC) || defined(STM32F098xx)
Kojto 90:cb3d968589d8 756 #define __HAL_DMA2_REMAP(__REQUEST__) \
Kojto 90:cb3d968589d8 757 do { assert_param(IS_HAL_DMA2_REMAP(__REQUEST__)); \
Kojto 93:e188a91d3eaa 758 DMA2->CSELR &= ~((uint32_t)0x0F << (uint32_t)(((__REQUEST__) >> 28) * 4)); \
Kojto 93:e188a91d3eaa 759 DMA2->CSELR |= (uint32_t)((__REQUEST__) & 0x0FFFFFFF); \
Kojto 90:cb3d968589d8 760 }while(0)
Kojto 93:e188a91d3eaa 761 #endif /* STM32F091xC || STM32F098xx */
Kojto 90:cb3d968589d8 762
Kojto 93:e188a91d3eaa 763 #endif /* STM32F091xC || STM32F098xx || STM32F030xC */
Kojto 90:cb3d968589d8 764
Kojto 90:cb3d968589d8 765 /**
Kojto 90:cb3d968589d8 766 * @}
Kojto 90:cb3d968589d8 767 */
Kojto 90:cb3d968589d8 768
Kojto 90:cb3d968589d8 769 /**
Kojto 90:cb3d968589d8 770 * @}
Kojto 90:cb3d968589d8 771 */
Kojto 90:cb3d968589d8 772
Kojto 90:cb3d968589d8 773 /**
Kojto 90:cb3d968589d8 774 * @}
Kojto 90:cb3d968589d8 775 */
Kojto 90:cb3d968589d8 776
Kojto 90:cb3d968589d8 777 #ifdef __cplusplus
Kojto 90:cb3d968589d8 778 }
Kojto 90:cb3d968589d8 779 #endif
Kojto 90:cb3d968589d8 780
Kojto 90:cb3d968589d8 781 #endif /* __STM32F0xx_HAL_DMA_EX_H */
Kojto 90:cb3d968589d8 782
Kojto 90:cb3d968589d8 783 /************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/