1 /**
2   ******************************************************************************
3   * @file    stm32g4xx_ll_dmamux.h
4   * @author  MCD Application Team
5   * @brief   Header file of DMAMUX LL module.
6   ******************************************************************************
7   * @attention
8   *
9   * Copyright (c) 2019 STMicroelectronics.
10   * All rights reserved.
11   *
12   * This software is licensed under terms that can be found in the LICENSE file
13   * in the root directory of this software component.
14   * If no LICENSE file comes with this software, it is provided AS-IS.
15   *
16   ******************************************************************************
17   */
18 
19 /* Define to prevent recursive inclusion -------------------------------------*/
20 #ifndef __STM32G4xx_LL_DMAMUX_H
21 #define __STM32G4xx_LL_DMAMUX_H
22 
23 #ifdef __cplusplus
24 extern "C" {
25 #endif
26 
27 /* Includes ------------------------------------------------------------------*/
28 #include "stm32g4xx.h"
29 
30 /** @addtogroup STM32G4xx_LL_Driver
31   * @{
32   */
33 
34 #if defined (DMAMUX1)
35 
36 /** @defgroup DMAMUX_LL DMAMUX
37   * @{
38   */
39 
40 /* Private types -------------------------------------------------------------*/
41 /* Private variables ---------------------------------------------------------*/
42 /* Private constants ---------------------------------------------------------*/
43 /** @defgroup DMAMUX_LL_Private_Constants DMAMUX Private Constants
44   * @{
45   */
46 /* Define used to get DMAMUX CCR register size */
47 #define DMAMUX_CCR_SIZE                   0x00000004U
48 
49 /* Define used to get DMAMUX RGCR register size */
50 #define DMAMUX_RGCR_SIZE                  0x00000004U
51 /**
52   * @}
53   */
54 
55 /* Private macros ------------------------------------------------------------*/
56 /** @defgroup DMAMUX_LL_Private_Macros DMAMUX Private Macros
57   * @{
58   */
59 #define UNUSED(X) (void)X
60 /**
61   * @}
62   */
63 
64 /* Exported types ------------------------------------------------------------*/
65 /* Exported constants --------------------------------------------------------*/
66 /** @defgroup DMAMUX_LL_Exported_Constants DMAMUX Exported Constants
67   * @{
68   */
69 /** @defgroup DMAMUX_LL_EC_CLEAR_FLAG Clear Flags Defines
70   * @brief    Flags defines which can be used with LL_DMAMUX_WriteReg function
71   * @{
72   */
73 #define LL_DMAMUX_CFR_CSOF0               DMAMUX_CFR_CSOF0       /*!< Synchronization Event Overrun Flag Channel 0  */
74 #define LL_DMAMUX_CFR_CSOF1               DMAMUX_CFR_CSOF1       /*!< Synchronization Event Overrun Flag Channel 1  */
75 #define LL_DMAMUX_CFR_CSOF2               DMAMUX_CFR_CSOF2       /*!< Synchronization Event Overrun Flag Channel 2  */
76 #define LL_DMAMUX_CFR_CSOF3               DMAMUX_CFR_CSOF3       /*!< Synchronization Event Overrun Flag Channel 3  */
77 #define LL_DMAMUX_CFR_CSOF4               DMAMUX_CFR_CSOF4       /*!< Synchronization Event Overrun Flag Channel 4  */
78 #define LL_DMAMUX_CFR_CSOF5               DMAMUX_CFR_CSOF5       /*!< Synchronization Event Overrun Flag Channel 5  */
79 #define LL_DMAMUX_CFR_CSOF6               DMAMUX_CFR_CSOF6       /*!< Synchronization Event Overrun Flag Channel 6  */
80 #define LL_DMAMUX_CFR_CSOF7               DMAMUX_CFR_CSOF7       /*!< Synchronization Event Overrun Flag Channel 7  */
81 #define LL_DMAMUX_CFR_CSOF8               DMAMUX_CFR_CSOF8       /*!< Synchronization Event Overrun Flag Channel 8  */
82 #define LL_DMAMUX_CFR_CSOF9               DMAMUX_CFR_CSOF9       /*!< Synchronization Event Overrun Flag Channel 9  */
83 #define LL_DMAMUX_CFR_CSOF10              DMAMUX_CFR_CSOF10      /*!< Synchronization Event Overrun Flag Channel 10 */
84 #define LL_DMAMUX_CFR_CSOF11              DMAMUX_CFR_CSOF11      /*!< Synchronization Event Overrun Flag Channel 11 */
85 #define LL_DMAMUX_CFR_CSOF12              DMAMUX_CFR_CSOF12      /*!< Synchronization Event Overrun Flag Channel 12 */
86 #define LL_DMAMUX_CFR_CSOF13              DMAMUX_CFR_CSOF13      /*!< Synchronization Event Overrun Flag Channel 13 */
87 #define LL_DMAMUX_CFR_CSOF14              DMAMUX_CFR_CSOF14      /*!< Synchronization Event Overrun Flag Channel 14 */
88 #define LL_DMAMUX_CFR_CSOF15              DMAMUX_CFR_CSOF15      /*!< Synchronization Event Overrun Flag Channel 15 */
89 #define LL_DMAMUX_RGCFR_RGCOF0            DMAMUX_RGCFR_COF0      /*!< Request Generator 0 Trigger Event Overrun Flag */
90 #define LL_DMAMUX_RGCFR_RGCOF1            DMAMUX_RGCFR_COF1      /*!< Request Generator 1 Trigger Event Overrun Flag */
91 #define LL_DMAMUX_RGCFR_RGCOF2            DMAMUX_RGCFR_COF2      /*!< Request Generator 2 Trigger Event Overrun Flag */
92 #define LL_DMAMUX_RGCFR_RGCOF3            DMAMUX_RGCFR_COF3      /*!< Request Generator 3 Trigger Event Overrun Flag */
93 /**
94   * @}
95   */
96 
97 /** @defgroup DMAMUX_LL_EC_GET_FLAG Get Flags Defines
98   * @brief    Flags defines which can be used with LL_DMAMUX_ReadReg function
99   * @{
100   */
101 #define LL_DMAMUX_CSR_SOF0                DMAMUX_CSR_SOF0       /*!< Synchronization Event Overrun Flag Channel 0  */
102 #define LL_DMAMUX_CSR_SOF1                DMAMUX_CSR_SOF1       /*!< Synchronization Event Overrun Flag Channel 1  */
103 #define LL_DMAMUX_CSR_SOF2                DMAMUX_CSR_SOF2       /*!< Synchronization Event Overrun Flag Channel 2  */
104 #define LL_DMAMUX_CSR_SOF3                DMAMUX_CSR_SOF3       /*!< Synchronization Event Overrun Flag Channel 3  */
105 #define LL_DMAMUX_CSR_SOF4                DMAMUX_CSR_SOF4       /*!< Synchronization Event Overrun Flag Channel 4  */
106 #define LL_DMAMUX_CSR_SOF5                DMAMUX_CSR_SOF5       /*!< Synchronization Event Overrun Flag Channel 5  */
107 #define LL_DMAMUX_CSR_SOF6                DMAMUX_CSR_SOF6       /*!< Synchronization Event Overrun Flag Channel 6  */
108 #define LL_DMAMUX_CSR_SOF7                DMAMUX_CSR_SOF7       /*!< Synchronization Event Overrun Flag Channel 7  */
109 #define LL_DMAMUX_CSR_SOF8                DMAMUX_CSR_SOF8       /*!< Synchronization Event Overrun Flag Channel 8  */
110 #define LL_DMAMUX_CSR_SOF9                DMAMUX_CSR_SOF9       /*!< Synchronization Event Overrun Flag Channel 9  */
111 #define LL_DMAMUX_CSR_SOF10               DMAMUX_CSR_SOF10      /*!< Synchronization Event Overrun Flag Channel 10 */
112 #define LL_DMAMUX_CSR_SOF11               DMAMUX_CSR_SOF11      /*!< Synchronization Event Overrun Flag Channel 11 */
113 #define LL_DMAMUX_CSR_SOF12               DMAMUX_CSR_SOF12      /*!< Synchronization Event Overrun Flag Channel 12 */
114 #define LL_DMAMUX_CSR_SOF13               DMAMUX_CSR_SOF13      /*!< Synchronization Event Overrun Flag Channel 13 */
115 #define LL_DMAMUX_CSR_SOF14               DMAMUX_CSR_SOF14      /*!< Synchronization Event Overrun Flag Channel 14 */
116 #define LL_DMAMUX_CSR_SOF15               DMAMUX_CSR_SOF15      /*!< Synchronization Event Overrun Flag Channel 15 */
117 #define LL_DMAMUX_RGSR_RGOF0              DMAMUX_RGSR_OF0       /*!< Request Generator 0 Trigger Event Overrun Flag */
118 #define LL_DMAMUX_RGSR_RGOF1              DMAMUX_RGSR_OF1       /*!< Request Generator 1 Trigger Event Overrun Flag */
119 #define LL_DMAMUX_RGSR_RGOF2              DMAMUX_RGSR_OF2       /*!< Request Generator 2 Trigger Event Overrun Flag */
120 #define LL_DMAMUX_RGSR_RGOF3              DMAMUX_RGSR_OF3       /*!< Request Generator 3 Trigger Event Overrun Flag */
121 /**
122   * @}
123   */
124 
125 /** @defgroup DMAMUX_LL_EC_IT IT Defines
126   * @brief    IT defines which can be used with LL_DMA_ReadReg and  LL_DMAMUX_WriteReg functions
127   * @{
128   */
129 #define LL_DMAMUX_CCR_SOIE                DMAMUX_CxCR_SOIE          /*!< Synchronization Event Overrun Interrupt */
130 #define LL_DMAMUX_RGCR_RGOIE              DMAMUX_RGxCR_OIE          /*!< Request Generation Trigger Event Overrun Interrupt    */
131 /**
132   * @}
133   */
134 
135 /** @defgroup DMAMUX_LL_EC_REQUEST Transfer request
136   * @{
137   */
138 #define LL_DMAMUX_REQ_MEM2MEM         0x00000000U  /*!< Memory to memory transfer  */
139 #define LL_DMAMUX_REQ_GENERATOR0      0x00000001U  /*!< DMAMUX request generator 0 */
140 #define LL_DMAMUX_REQ_GENERATOR1      0x00000002U  /*!< DMAMUX request generator 1 */
141 #define LL_DMAMUX_REQ_GENERATOR2      0x00000003U  /*!< DMAMUX request generator 2 */
142 #define LL_DMAMUX_REQ_GENERATOR3      0x00000004U  /*!< DMAMUX request generator 3 */
143 #define LL_DMAMUX_REQ_ADC1            0x00000005U  /*!< DMAMUX ADC1 request        */
144 #define LL_DMAMUX_REQ_DAC1_CH1        0x00000006U  /*!< DMAMUX DAC1 CH1 request    */
145 #define LL_DMAMUX_REQ_DAC1_CH2        0x00000007U  /*!< DMAMUX DAC1 CH2 request    */
146 #define LL_DMAMUX_REQ_TIM6_UP         0x00000008U  /*!< DMAMUX TIM6 UP request     */
147 #define LL_DMAMUX_REQ_TIM7_UP         0x00000009U  /*!< DMAMUX TIM7 UP request     */
148 #define LL_DMAMUX_REQ_SPI1_RX         0x0000000AU  /*!< DMAMUX SPI1 RX request     */
149 #define LL_DMAMUX_REQ_SPI1_TX         0x0000000BU  /*!< DMAMUX SPI1 TX request     */
150 #define LL_DMAMUX_REQ_SPI2_RX         0x0000000CU  /*!< DMAMUX SPI2 RX request     */
151 #define LL_DMAMUX_REQ_SPI2_TX         0x0000000DU  /*!< DMAMUX SPI2 TX request     */
152 #define LL_DMAMUX_REQ_SPI3_RX         0x0000000EU  /*!< DMAMUX SPI3 RX request     */
153 #define LL_DMAMUX_REQ_SPI3_TX         0x0000000FU  /*!< DMAMUX SPI3 TX request     */
154 #define LL_DMAMUX_REQ_I2C1_RX         0x00000010U  /*!< DMAMUX I2C1 RX request     */
155 #define LL_DMAMUX_REQ_I2C1_TX         0x00000011U  /*!< DMAMUX I2C1 TX request     */
156 #define LL_DMAMUX_REQ_I2C2_RX         0x00000012U  /*!< DMAMUX I2C2 RX request     */
157 #define LL_DMAMUX_REQ_I2C2_TX         0x00000013U  /*!< DMAMUX I2C2 TX request     */
158 #define LL_DMAMUX_REQ_I2C3_RX         0x00000014U  /*!< DMAMUX I2C3 RX request     */
159 #define LL_DMAMUX_REQ_I2C3_TX         0x00000015U  /*!< DMAMUX I2C3 TX request     */
160 #define LL_DMAMUX_REQ_I2C4_RX         0x00000016U  /*!< DMAMUX I2C4 RX request     */
161 #define LL_DMAMUX_REQ_I2C4_TX         0x00000017U  /*!< DMAMUX I2C4 TX request     */
162 #define LL_DMAMUX_REQ_USART1_RX       0x00000018U  /*!< DMAMUX USART1 RX request   */
163 #define LL_DMAMUX_REQ_USART1_TX       0x00000019U  /*!< DMAMUX USART1 TX request   */
164 #define LL_DMAMUX_REQ_USART2_RX       0x0000001AU  /*!< DMAMUX USART2 RX request   */
165 #define LL_DMAMUX_REQ_USART2_TX       0x0000001BU  /*!< DMAMUX USART2 TX request   */
166 #define LL_DMAMUX_REQ_USART3_RX       0x0000001CU  /*!< DMAMUX USART3 RX request   */
167 #define LL_DMAMUX_REQ_USART3_TX       0x0000001DU  /*!< DMAMUX USART3 TX request   */
168 #define LL_DMAMUX_REQ_UART4_RX        0x0000001EU  /*!< DMAMUX UART4 RX request    */
169 #define LL_DMAMUX_REQ_UART4_TX        0x0000001FU  /*!< DMAMUX UART4 TX request    */
170 #define LL_DMAMUX_REQ_UART5_RX        0x00000020U  /*!< DMAMUX UART5 RX request    */
171 #define LL_DMAMUX_REQ_UART5_TX        0x00000021U  /*!< DMAMUX UART5 TX request    */
172 #define LL_DMAMUX_REQ_LPUART1_RX      0x00000022U  /*!< DMAMUX LPUART1 RX request  */
173 #define LL_DMAMUX_REQ_LPUART1_TX      0x00000023U  /*!< DMAMUX LPUART1 TX request  */
174 #define LL_DMAMUX_REQ_ADC2            0x00000024U  /*!< DMAMUX ADC2 request        */
175 #define LL_DMAMUX_REQ_ADC3            0x00000025U  /*!< DMAMUX ADC3 request        */
176 #define LL_DMAMUX_REQ_ADC4            0x00000026U  /*!< DMAMUX ADC4 request        */
177 #define LL_DMAMUX_REQ_ADC5            0x00000027U  /*!< DMAMUX ADC5 request        */
178 #define LL_DMAMUX_REQ_QSPI            0x00000028U  /*!< DMAMUX QSPI request        */
179 #define LL_DMAMUX_REQ_DAC2_CH1        0x00000029U  /*!< DMAMUX DAC2 CH1 request    */
180 #define LL_DMAMUX_REQ_TIM1_CH1        0x0000002AU  /*!< DMAMUX TIM1 CH1 request    */
181 #define LL_DMAMUX_REQ_TIM1_CH2        0x0000002BU  /*!< DMAMUX TIM1 CH2 request    */
182 #define LL_DMAMUX_REQ_TIM1_CH3        0x0000002CU  /*!< DMAMUX TIM1 CH3 request    */
183 #define LL_DMAMUX_REQ_TIM1_CH4        0x0000002DU  /*!< DMAMUX TIM1 CH4 request    */
184 #define LL_DMAMUX_REQ_TIM1_UP         0x0000002EU  /*!< DMAMUX TIM1 UP request     */
185 #define LL_DMAMUX_REQ_TIM1_TRIG       0x0000002FU  /*!< DMAMUX TIM1 TRIG request   */
186 #define LL_DMAMUX_REQ_TIM1_COM        0x00000030U  /*!< DMAMUX TIM1 COM request    */
187 #define LL_DMAMUX_REQ_TIM8_CH1        0x00000031U  /*!< DMAMUX TIM8 CH1 request    */
188 #define LL_DMAMUX_REQ_TIM8_CH2        0x00000032U  /*!< DMAMUX TIM8 CH2 request    */
189 #define LL_DMAMUX_REQ_TIM8_CH3        0x00000033U  /*!< DMAMUX TIM8 CH3 request    */
190 #define LL_DMAMUX_REQ_TIM8_CH4        0x00000034U  /*!< DMAMUX TIM8 CH4 request    */
191 #define LL_DMAMUX_REQ_TIM8_UP         0x00000035U  /*!< DMAMUX TIM8 UP request     */
192 #define LL_DMAMUX_REQ_TIM8_TRIG       0x00000036U  /*!< DMAMUX TIM8 TRIG request   */
193 #define LL_DMAMUX_REQ_TIM8_COM        0x00000037U  /*!< DMAMUX TIM8 COM request    */
194 #define LL_DMAMUX_REQ_TIM2_CH1        0x00000038U  /*!< DMAMUX TIM2 CH1 request    */
195 #define LL_DMAMUX_REQ_TIM2_CH2        0x00000039U  /*!< DMAMUX TIM2 CH2 request    */
196 #define LL_DMAMUX_REQ_TIM2_CH3        0x0000003AU  /*!< DMAMUX TIM2 CH3 request    */
197 #define LL_DMAMUX_REQ_TIM2_CH4        0x0000003BU  /*!< DMAMUX TIM2 CH4 request    */
198 #define LL_DMAMUX_REQ_TIM2_UP         0x0000003CU  /*!< DMAMUX TIM2 UP request     */
199 #define LL_DMAMUX_REQ_TIM3_CH1        0x0000003DU  /*!< DMAMUX TIM3 CH1 request    */
200 #define LL_DMAMUX_REQ_TIM3_CH2        0x0000003EU  /*!< DMAMUX TIM3 CH2 request    */
201 #define LL_DMAMUX_REQ_TIM3_CH3        0x0000003FU  /*!< DMAMUX TIM3 CH3 request    */
202 #define LL_DMAMUX_REQ_TIM3_CH4        0x00000040U  /*!< DMAMUX TIM3 CH4 request    */
203 #define LL_DMAMUX_REQ_TIM3_UP         0x00000041U  /*!< DMAMUX TIM3 UP request     */
204 #define LL_DMAMUX_REQ_TIM3_TRIG       0x00000042U  /*!< DMAMUX TIM3 TRIG request   */
205 #define LL_DMAMUX_REQ_TIM4_CH1        0x00000043U  /*!< DMAMUX TIM4 CH1 request    */
206 #define LL_DMAMUX_REQ_TIM4_CH2        0x00000044U  /*!< DMAMUX TIM4 CH2 request    */
207 #define LL_DMAMUX_REQ_TIM4_CH3        0x00000045U  /*!< DMAMUX TIM4 CH3 request    */
208 #define LL_DMAMUX_REQ_TIM4_CH4        0x00000046U  /*!< DMAMUX TIM4 CH4 request    */
209 #define LL_DMAMUX_REQ_TIM4_UP         0x00000047U  /*!< DMAMUX TIM4 UP request     */
210 #define LL_DMAMUX_REQ_TIM5_CH1        0x00000048U  /*!< DMAMUX TIM5 CH1 request    */
211 #define LL_DMAMUX_REQ_TIM5_CH2        0x00000049U  /*!< DMAMUX TIM5 CH2 request    */
212 #define LL_DMAMUX_REQ_TIM5_CH3        0x0000004AU  /*!< DMAMUX TIM5 CH3 request    */
213 #define LL_DMAMUX_REQ_TIM5_CH4        0x0000004BU  /*!< DMAMUX TIM5 CH4 request    */
214 #define LL_DMAMUX_REQ_TIM5_UP         0x0000004CU  /*!< DMAMUX TIM5 UP request     */
215 #define LL_DMAMUX_REQ_TIM5_TRIG       0x0000004DU  /*!< DMAMUX TIM5 TRIG request   */
216 #define LL_DMAMUX_REQ_TIM15_CH1       0x0000004EU  /*!< DMAMUX TIM15 CH1 request   */
217 #define LL_DMAMUX_REQ_TIM15_UP        0x0000004FU  /*!< DMAMUX TIM15 UP request    */
218 #define LL_DMAMUX_REQ_TIM15_TRIG      0x00000050U  /*!< DMAMUX TIM15 TRIG request  */
219 #define LL_DMAMUX_REQ_TIM15_COM       0x00000051U  /*!< DMAMUX TIM15 COM request   */
220 #define LL_DMAMUX_REQ_TIM16_CH1       0x00000052U  /*!< DMAMUX TIM16 CH1 request   */
221 #define LL_DMAMUX_REQ_TIM16_UP        0x00000053U  /*!< DMAMUX TIM16 UP request    */
222 #define LL_DMAMUX_REQ_TIM17_CH1       0x00000054U  /*!< DMAMUX TIM17 CH1 request   */
223 #define LL_DMAMUX_REQ_TIM17_UP        0x00000055U  /*!< DMAMUX TIM17 UP request    */
224 #define LL_DMAMUX_REQ_TIM20_CH1       0x00000056U  /*!< DMAMUX TIM20 CH1 request   */
225 #define LL_DMAMUX_REQ_TIM20_CH2       0x00000057U  /*!< DMAMUX TIM20 CH2 request   */
226 #define LL_DMAMUX_REQ_TIM20_CH3       0x00000058U  /*!< DMAMUX TIM20 CH3 request   */
227 #define LL_DMAMUX_REQ_TIM20_CH4       0x00000059U  /*!< DMAMUX TIM20 CH4 request   */
228 #define LL_DMAMUX_REQ_TIM20_UP        0x0000005AU  /*!< DMAMUX TIM20 UP request    */
229 #define LL_DMAMUX_REQ_AES_IN          0x0000005BU  /*!< DMAMUX AES_IN request      */
230 #define LL_DMAMUX_REQ_AES_OUT         0x0000005CU  /*!< DMAMUX AES_OUT request     */
231 #define LL_DMAMUX_REQ_TIM20_TRIG      0x0000005DU  /*!< DMAMUX TIM20 TRIG request  */
232 #define LL_DMAMUX_REQ_TIM20_COM       0x0000005EU  /*!< DMAMUX TIM20 COM request   */
233 #define LL_DMAMUX_REQ_HRTIM1_M        0x0000005FU  /*!< DMAMUX HRTIM M request     */
234 #define LL_DMAMUX_REQ_HRTIM1_A        0x00000060U  /*!< DMAMUX HRTIM A request     */
235 #define LL_DMAMUX_REQ_HRTIM1_B        0x00000061U  /*!< DMAMUX HRTIM B request     */
236 #define LL_DMAMUX_REQ_HRTIM1_C        0x00000062U  /*!< DMAMUX HRTIM C request     */
237 #define LL_DMAMUX_REQ_HRTIM1_D        0x00000063U  /*!< DMAMUX HRTIM D request     */
238 #define LL_DMAMUX_REQ_HRTIM1_E        0x00000064U  /*!< DMAMUX HRTIM E request     */
239 #define LL_DMAMUX_REQ_HRTIM1_F        0x00000065U  /*!< DMAMUX HRTIM F request     */
240 #define LL_DMAMUX_REQ_DAC3_CH1        0x00000066U  /*!< DMAMUX DAC3 CH1 request    */
241 #define LL_DMAMUX_REQ_DAC3_CH2        0x00000067U  /*!< DMAMUX DAC3 CH2 request    */
242 #define LL_DMAMUX_REQ_DAC4_CH1        0x00000068U  /*!< DMAMUX DAC4 CH1 request    */
243 #define LL_DMAMUX_REQ_DAC4_CH2        0x00000069U  /*!< DMAMUX DAC4 CH2 request    */
244 #define LL_DMAMUX_REQ_SPI4_RX         0x0000006AU  /*!< DMAMUX SPI4 RX request     */
245 #define LL_DMAMUX_REQ_SPI4_TX         0x0000006BU  /*!< DMAMUX SPI4 TX request     */
246 #define LL_DMAMUX_REQ_SAI1_A          0x0000006CU  /*!< DMAMUX SAI1 A request      */
247 #define LL_DMAMUX_REQ_SAI1_B          0x0000006DU  /*!< DMAMUX SAI1 B request      */
248 #define LL_DMAMUX_REQ_FMAC_READ       0x0000006EU  /*!< DMAMUX FMAC READ request   */
249 #define LL_DMAMUX_REQ_FMAC_WRITE      0x0000006FU  /*!< DMAMUX FMAC WRITE request  */
250 #define LL_DMAMUX_REQ_CORDIC_READ     0x00000070U  /*!< DMAMUX CORDIC READ request */
251 #define LL_DMAMUX_REQ_CORDIC_WRITE    0x00000071U  /*!< DMAMUX CORDIC WRITE request*/
252 #define LL_DMAMUX_REQ_UCPD1_RX        0x00000072U  /*!< DMAMUX USBPD1_RX request   */
253 #define LL_DMAMUX_REQ_UCPD1_TX        0x00000073U  /*!< DMAMUX USBPD1_TX request   */
254 
255 /**
256   * @}
257   */
258 
259 /** @defgroup DMAMUX_LL_EC_CHANNEL DMAMUX Channel
260   * @{
261   */
262 #define LL_DMAMUX_CHANNEL_0               0x00000000U               /*!< DMAMUX Channel 0 connected to DMA1 Channel 1  */
263 #define LL_DMAMUX_CHANNEL_1               0x00000001U               /*!< DMAMUX Channel 1 connected to DMA1 Channel 2  */
264 #define LL_DMAMUX_CHANNEL_2               0x00000002U               /*!< DMAMUX Channel 2 connected to DMA1 Channel 3  */
265 #define LL_DMAMUX_CHANNEL_3               0x00000003U               /*!< DMAMUX Channel 3 connected to DMA1 Channel 4  */
266 #define LL_DMAMUX_CHANNEL_4               0x00000004U               /*!< DMAMUX Channel 4 connected to DMA1 Channel 5  */
267 #define LL_DMAMUX_CHANNEL_5               0x00000005U               /*!< DMAMUX Channel 5 connected to DMA1 Channel 6  */
268 #define LL_DMAMUX_CHANNEL_6               0x00000006U               /*!< DMAMUX Channel 6 connected to DMA1 Channel 7  */
269 #define LL_DMAMUX_CHANNEL_7               0x00000007U               /*!< DMAMUX Channel 7 connected to DMA1 Channel 8  */
270 #define LL_DMAMUX_CHANNEL_8               0x00000008U               /*!< DMAMUX Channel 8 connected to DMA2 Channel 1  */
271 #define LL_DMAMUX_CHANNEL_9               0x00000009U               /*!< DMAMUX Channel 9 connected to DMA2 Channel 2  */
272 #define LL_DMAMUX_CHANNEL_10              0x0000000AU               /*!< DMAMUX Channel 10 connected to DMA2 Channel 3 */
273 #define LL_DMAMUX_CHANNEL_11              0x0000000BU               /*!< DMAMUX Channel 11 connected to DMA2 Channel 4 */
274 #define LL_DMAMUX_CHANNEL_12              0x0000000CU               /*!< DMAMUX Channel 12 connected to DMA2 Channel 5 */
275 #define LL_DMAMUX_CHANNEL_13              0x0000000DU               /*!< DMAMUX Channel 13 connected to DMA2 Channel 6 */
276 #define LL_DMAMUX_CHANNEL_14              0x0000000EU               /*!< DMAMUX Channel 14 connected to DMA2 Channel 7 */
277 #define LL_DMAMUX_CHANNEL_15              0x0000000FU               /*!< DMAMUX Channel 15 connected to DMA2 Channel 8 */
278 /**
279   * @}
280   */
281 
282 /** @defgroup DMAMUX_LL_EC_SYNC_NO Synchronization Signal Polarity
283   * @{
284   */
285 #define LL_DMAMUX_SYNC_NO_EVENT            0x00000000U                               /*!< All requests are blocked   */
286 #define LL_DMAMUX_SYNC_POL_RISING          DMAMUX_CxCR_SPOL_0                        /*!< Synchronization on event on rising edge */
287 #define LL_DMAMUX_SYNC_POL_FALLING         DMAMUX_CxCR_SPOL_1                        /*!< Synchronization on event on falling edge */
288 #define LL_DMAMUX_SYNC_POL_RISING_FALLING  (DMAMUX_CxCR_SPOL_0 | DMAMUX_CxCR_SPOL_1) /*!< Synchronization on event on rising and falling edge */
289 /**
290   * @}
291   */
292 
293 /** @defgroup DMAMUX_LL_EC_SYNC_EVT Synchronization Signal Event
294   * @{
295   */
296 #define LL_DMAMUX_SYNC_EXTI_LINE0      0x00000000U                                                                                     /*!< Synchronization signal from EXTI Line0  */
297 #define LL_DMAMUX_SYNC_EXTI_LINE1      DMAMUX_CxCR_SYNC_ID_0                                                                           /*!< Synchronization signal from EXTI Line1  */
298 #define LL_DMAMUX_SYNC_EXTI_LINE2      DMAMUX_CxCR_SYNC_ID_1                                                                           /*!< Synchronization signal from EXTI Line2  */
299 #define LL_DMAMUX_SYNC_EXTI_LINE3      (DMAMUX_CxCR_SYNC_ID_1 |DMAMUX_CxCR_SYNC_ID_0)                                                  /*!< Synchronization signal from EXTI Line3  */
300 #define LL_DMAMUX_SYNC_EXTI_LINE4      DMAMUX_CxCR_SYNC_ID_2                                                                           /*!< Synchronization signal from EXTI Line4  */
301 #define LL_DMAMUX_SYNC_EXTI_LINE5      (DMAMUX_CxCR_SYNC_ID_2 | DMAMUX_CxCR_SYNC_ID_0)                                                 /*!< Synchronization signal from EXTI Line5  */
302 #define LL_DMAMUX_SYNC_EXTI_LINE6      (DMAMUX_CxCR_SYNC_ID_2 | DMAMUX_CxCR_SYNC_ID_1)                                                 /*!< Synchronization signal from EXTI Line6  */
303 #define LL_DMAMUX_SYNC_EXTI_LINE7      (DMAMUX_CxCR_SYNC_ID_2 | DMAMUX_CxCR_SYNC_ID_1 | DMAMUX_CxCR_SYNC_ID_0)                         /*!< Synchronization signal from EXTI Line7  */
304 #define LL_DMAMUX_SYNC_EXTI_LINE8      DMAMUX_CxCR_SYNC_ID_3                                                                           /*!< Synchronization signal from EXTI Line8  */
305 #define LL_DMAMUX_SYNC_EXTI_LINE9      (DMAMUX_CxCR_SYNC_ID_3 | DMAMUX_CxCR_SYNC_ID_0)                                                 /*!< Synchronization signal from EXTI Line9  */
306 #define LL_DMAMUX_SYNC_EXTI_LINE10     (DMAMUX_CxCR_SYNC_ID_3 | DMAMUX_CxCR_SYNC_ID_1)                                                 /*!< Synchronization signal from EXTI Line10 */
307 #define LL_DMAMUX_SYNC_EXTI_LINE11     (DMAMUX_CxCR_SYNC_ID_3 | DMAMUX_CxCR_SYNC_ID_1 | DMAMUX_CxCR_SYNC_ID_0)                         /*!< Synchronization signal from EXTI Line11 */
308 #define LL_DMAMUX_SYNC_EXTI_LINE12     (DMAMUX_CxCR_SYNC_ID_3 | DMAMUX_CxCR_SYNC_ID_2)                                                 /*!< Synchronization signal from EXTI Line12 */
309 #define LL_DMAMUX_SYNC_EXTI_LINE13     (DMAMUX_CxCR_SYNC_ID_3 | DMAMUX_CxCR_SYNC_ID_2 | DMAMUX_CxCR_SYNC_ID_0)                         /*!< Synchronization signal from EXTI Line13 */
310 #define LL_DMAMUX_SYNC_EXTI_LINE14     (DMAMUX_CxCR_SYNC_ID_3 | DMAMUX_CxCR_SYNC_ID_2 | DMAMUX_CxCR_SYNC_ID_1)                         /*!< Synchronization signal from EXTI Line14 */
311 #define LL_DMAMUX_SYNC_EXTI_LINE15     (DMAMUX_CxCR_SYNC_ID_3 | DMAMUX_CxCR_SYNC_ID_2 | DMAMUX_CxCR_SYNC_ID_1 | DMAMUX_CxCR_SYNC_ID_0) /*!< Synchronization signal from EXTI Line15 */
312 #define LL_DMAMUX_SYNC_DMAMUX_CH0      DMAMUX_CxCR_SYNC_ID_4                                                                           /*!< Synchronization signal from DMAMUX channel0 Event */
313 #define LL_DMAMUX_SYNC_DMAMUX_CH1      (DMAMUX_CxCR_SYNC_ID_4 | DMAMUX_CxCR_SYNC_ID_0)                                                 /*!< Synchronization signal from DMAMUX channel1 Event */
314 #define LL_DMAMUX_SYNC_DMAMUX_CH2      (DMAMUX_CxCR_SYNC_ID_4 | DMAMUX_CxCR_SYNC_ID_1)                                                 /*!< Synchronization signal from DMAMUX channel2 Event */
315 #define LL_DMAMUX_SYNC_DMAMUX_CH3      (DMAMUX_CxCR_SYNC_ID_4 | DMAMUX_CxCR_SYNC_ID_1 | DMAMUX_CxCR_SYNC_ID_0)                         /*!< Synchronization signal from DMAMUX channel3 Event */
316 #define LL_DMAMUX_SYNC_LPTIM1_OUT      (DMAMUX_CxCR_SYNC_ID_4 | DMAMUX_CxCR_SYNC_ID_2)                                                 /*!< Synchronization signal from LPTIM1 Output */
317 /**
318   * @}
319   */
320 
321 /** @defgroup DMAMUX_LL_EC_REQUEST_GENERATOR Request Generator Channel
322   * @{
323   */
324 #define LL_DMAMUX_REQ_GEN_0           0x00000000U
325 #define LL_DMAMUX_REQ_GEN_1           0x00000001U
326 #define LL_DMAMUX_REQ_GEN_2           0x00000002U
327 #define LL_DMAMUX_REQ_GEN_3           0x00000003U
328 /**
329   * @}
330   */
331 
332 /** @defgroup DMAMUX_LL_EC_REQUEST_GEN_POLARITY External Request Signal Generation Polarity
333   * @{
334   */
335 #define LL_DMAMUX_REQ_GEN_NO_EVENT                  0x00000000U                                  /*!< No external DMA request  generation */
336 #define LL_DMAMUX_REQ_GEN_POL_RISING                DMAMUX_RGxCR_GPOL_0                          /*!< External DMA request generation on event on rising edge */
337 #define LL_DMAMUX_REQ_GEN_POL_FALLING               DMAMUX_RGxCR_GPOL_1                          /*!< External DMA request generation on event on falling edge */
338 #define LL_DMAMUX_REQ_GEN_POL_RISING_FALLING        (DMAMUX_RGxCR_GPOL_0 | DMAMUX_RGxCR_GPOL_1)  /*!< External DMA request generation on rising and falling edge */
339 /**
340   * @}
341   */
342 
343 /** @defgroup DMAMUX_LL_EC_REQUEST_GEN External Request Signal Generation
344   * @{
345   */
346 #define LL_DMAMUX_REQ_GEN_EXTI_LINE0      0x00000000U                                                                                     /*!< Request signal generation from EXTI Line0  */
347 #define LL_DMAMUX_REQ_GEN_EXTI_LINE1      DMAMUX_RGxCR_SIG_ID_0                                                                           /*!< Request signal generation from EXTI Line1  */
348 #define LL_DMAMUX_REQ_GEN_EXTI_LINE2      DMAMUX_RGxCR_SIG_ID_1                                                                           /*!< Request signal generation from EXTI Line2  */
349 #define LL_DMAMUX_REQ_GEN_EXTI_LINE3      (DMAMUX_RGxCR_SIG_ID_1 |DMAMUX_RGxCR_SIG_ID_0)                                                  /*!< Request signal generation from EXTI Line3  */
350 #define LL_DMAMUX_REQ_GEN_EXTI_LINE4      DMAMUX_RGxCR_SIG_ID_2                                                                           /*!< Request signal generation from EXTI Line4  */
351 #define LL_DMAMUX_REQ_GEN_EXTI_LINE5      (DMAMUX_RGxCR_SIG_ID_2 | DMAMUX_RGxCR_SIG_ID_0)                                                 /*!< Request signal generation from EXTI Line5  */
352 #define LL_DMAMUX_REQ_GEN_EXTI_LINE6      (DMAMUX_RGxCR_SIG_ID_2 | DMAMUX_RGxCR_SIG_ID_1)                                                 /*!< Request signal generation from EXTI Line6  */
353 #define LL_DMAMUX_REQ_GEN_EXTI_LINE7      (DMAMUX_RGxCR_SIG_ID_2 | DMAMUX_RGxCR_SIG_ID_1 | DMAMUX_RGxCR_SIG_ID_0)                         /*!< Request signal generation from EXTI Line7  */
354 #define LL_DMAMUX_REQ_GEN_EXTI_LINE8      DMAMUX_RGxCR_SIG_ID_3                                                                           /*!< Request signal generation from EXTI Line8  */
355 #define LL_DMAMUX_REQ_GEN_EXTI_LINE9      (DMAMUX_RGxCR_SIG_ID_3 | DMAMUX_RGxCR_SIG_ID_0)                                                 /*!< Request signal generation from EXTI Line9  */
356 #define LL_DMAMUX_REQ_GEN_EXTI_LINE10     (DMAMUX_RGxCR_SIG_ID_3 | DMAMUX_RGxCR_SIG_ID_1)                                                 /*!< Request signal generation from EXTI Line10 */
357 #define LL_DMAMUX_REQ_GEN_EXTI_LINE11     (DMAMUX_RGxCR_SIG_ID_3 | DMAMUX_RGxCR_SIG_ID_1 | DMAMUX_RGxCR_SIG_ID_0)                         /*!< Request signal generation from EXTI Line11 */
358 #define LL_DMAMUX_REQ_GEN_EXTI_LINE12     (DMAMUX_RGxCR_SIG_ID_3 | DMAMUX_RGxCR_SIG_ID_2)                                                 /*!< Request signal generation from EXTI Line12 */
359 #define LL_DMAMUX_REQ_GEN_EXTI_LINE13     (DMAMUX_RGxCR_SIG_ID_3 | DMAMUX_RGxCR_SIG_ID_2 | DMAMUX_RGxCR_SIG_ID_0)                         /*!< Request signal generation from EXTI Line13 */
360 #define LL_DMAMUX_REQ_GEN_EXTI_LINE14     (DMAMUX_RGxCR_SIG_ID_3 | DMAMUX_RGxCR_SIG_ID_2 | DMAMUX_RGxCR_SIG_ID_1)                         /*!< Request signal generation from EXTI Line14 */
361 #define LL_DMAMUX_REQ_GEN_EXTI_LINE15     (DMAMUX_RGxCR_SIG_ID_3 | DMAMUX_RGxCR_SIG_ID_2 | DMAMUX_RGxCR_SIG_ID_1 | DMAMUX_RGxCR_SIG_ID_0) /*!< Request signal generation from EXTI Line15 */
362 #define LL_DMAMUX_REQ_GEN_DMAMUX_CH0      DMAMUX_RGxCR_SIG_ID_4                                                                           /*!< Request signal generation from DMAMUX channel0 Event */
363 #define LL_DMAMUX_REQ_GEN_DMAMUX_CH1      (DMAMUX_RGxCR_SIG_ID_4 | DMAMUX_RGxCR_SIG_ID_0)                                                 /*!< Request signal generation from DMAMUX channel1 Event */
364 #define LL_DMAMUX_REQ_GEN_DMAMUX_CH2      (DMAMUX_RGxCR_SIG_ID_4 | DMAMUX_RGxCR_SIG_ID_1)                                                 /*!< Request signal generation from DMAMUX channel2 Event */
365 #define LL_DMAMUX_REQ_GEN_DMAMUX_CH3      (DMAMUX_RGxCR_SIG_ID_4 | DMAMUX_RGxCR_SIG_ID_1 | DMAMUX_RGxCR_SIG_ID_0)                         /*!< Request signal generation from DMAMUX channel3 Event */
366 #define LL_DMAMUX_REQ_GEN_LPTIM1_OUT      (DMAMUX_RGxCR_SIG_ID_4 | DMAMUX_RGxCR_SIG_ID_2)                                                 /*!< Request signal generation from LPTIM1 Output */
367 /**
368   * @}
369   */
370 
371 /**
372   * @}
373   */
374 
375 /* Exported macro ------------------------------------------------------------*/
376 /** @defgroup DMAMUX_LL_Exported_Macros DMAMUX Exported Macros
377   * @{
378   */
379 /** @defgroup DMAMUX_LL_EM_WRITE_READ Common Write and read registers macros
380   * @{
381   */
382 /**
383   * @brief  Write a value in DMAMUX register
384   * @param  __INSTANCE__ DMAMUX Instance
385   * @param  __REG__ Register to be written
386   * @param  __VALUE__ Value to be written in the register
387   * @retval None
388   */
389 #define LL_DMAMUX_WriteReg(__INSTANCE__, __REG__, __VALUE__) WRITE_REG(__INSTANCE__->__REG__, (__VALUE__))
390 
391 /**
392   * @brief  Read a value in DMAMUX register
393   * @param  __INSTANCE__ DMAMUX Instance
394   * @param  __REG__ Register to be read
395   * @retval Register value
396   */
397 #define LL_DMAMUX_ReadReg(__INSTANCE__, __REG__) READ_REG(__INSTANCE__->__REG__)
398 /**
399   * @}
400   */
401 
402 /**
403   * @}
404   */
405 
406 /* Exported functions --------------------------------------------------------*/
407 /** @defgroup DMAMUX_LL_Exported_Functions DMAMUX Exported Functions
408   * @{
409   */
410 
411 /** @defgroup DMAMUX_LL_EF_Configuration Configuration
412   * @{
413   */
414 /**
415   * @brief  Set DMAMUX request ID for DMAMUX Channel x.
416   * @note   DMAMUX channel 0 to 7 are mapped to DMA1 channel 1 to 8.
417   *         DMAMUX channel 8 to 15 are mapped to DMA2 channel 1 to 8.
418   * @rmtoll CxCR         DMAREQ_ID     LL_DMAMUX_SetRequestID
419   * @param  DMAMUXx DMAMUXx Instance
420   * @param  Channel This parameter can be one of the following values:
421   *         @arg @ref LL_DMAMUX_CHANNEL_0
422   *         @arg @ref LL_DMAMUX_CHANNEL_1
423   *         @arg @ref LL_DMAMUX_CHANNEL_2
424   *         @arg @ref LL_DMAMUX_CHANNEL_3
425   *         @arg @ref LL_DMAMUX_CHANNEL_4
426   *         @arg @ref LL_DMAMUX_CHANNEL_5
427   *         @arg @ref LL_DMAMUX_CHANNEL_6
428   *         @arg @ref LL_DMAMUX_CHANNEL_7
429   *         @arg @ref LL_DMAMUX_CHANNEL_8
430   *         @arg @ref LL_DMAMUX_CHANNEL_9
431   *         @arg @ref LL_DMAMUX_CHANNEL_10
432   *         @arg @ref LL_DMAMUX_CHANNEL_11
433   *         @arg @ref LL_DMAMUX_CHANNEL_12
434   *         @arg @ref LL_DMAMUX_CHANNEL_13
435   *         @arg @ref LL_DMAMUX_CHANNEL_14
436   *         @arg @ref LL_DMAMUX_CHANNEL_15
437   * @param  Request This parameter can be one of the following values:
438   *         @arg @ref LL_DMAMUX_REQ_MEM2MEM
439   *         @arg @ref LL_DMAMUX_REQ_GENERATOR0
440   *         @arg @ref LL_DMAMUX_REQ_GENERATOR1
441   *         @arg @ref LL_DMAMUX_REQ_GENERATOR2
442   *         @arg @ref LL_DMAMUX_REQ_GENERATOR3
443   *         @arg @ref LL_DMAMUX_REQ_ADC1
444   *         @arg @ref LL_DMAMUX_REQ_DAC1_CH1
445   *         @arg @ref LL_DMAMUX_REQ_DAC1_CH2
446   *         @arg @ref LL_DMAMUX_REQ_TIM6_UP
447   *         @arg @ref LL_DMAMUX_REQ_TIM7_UP
448   *         @arg @ref LL_DMAMUX_REQ_SPI1_RX
449   *         @arg @ref LL_DMAMUX_REQ_SPI1_TX
450   *         @arg @ref LL_DMAMUX_REQ_SPI2_RX
451   *         @arg @ref LL_DMAMUX_REQ_SPI2_TX
452   *         @arg @ref LL_DMAMUX_REQ_SPI3_RX
453   *         @arg @ref LL_DMAMUX_REQ_SPI3_TX
454   *         @arg @ref LL_DMAMUX_REQ_I2C1_RX
455   *         @arg @ref LL_DMAMUX_REQ_I2C1_TX
456   *         @arg @ref LL_DMAMUX_REQ_I2C2_RX
457   *         @arg @ref LL_DMAMUX_REQ_I2C2_TX
458   *         @arg @ref LL_DMAMUX_REQ_I2C3_RX
459   *         @arg @ref LL_DMAMUX_REQ_I2C3_TX (*)
460   *         @arg @ref LL_DMAMUX_REQ_I2C4_RX (*)
461   *         @arg @ref LL_DMAMUX_REQ_I2C4_TX
462   *         @arg @ref LL_DMAMUX_REQ_USART1_RX
463   *         @arg @ref LL_DMAMUX_REQ_USART1_TX
464   *         @arg @ref LL_DMAMUX_REQ_USART2_RX
465   *         @arg @ref LL_DMAMUX_REQ_USART2_TX
466   *         @arg @ref LL_DMAMUX_REQ_USART3_RX
467   *         @arg @ref LL_DMAMUX_REQ_USART3_TX
468   *         @arg @ref LL_DMAMUX_REQ_UART4_RX
469   *         @arg @ref LL_DMAMUX_REQ_UART4_TX
470   *         @arg @ref LL_DMAMUX_REQ_UART5_RX (*)
471   *         @arg @ref LL_DMAMUX_REQ_UART5_TX (*)
472   *         @arg @ref LL_DMAMUX_REQ_LPUART1_RX
473   *         @arg @ref LL_DMAMUX_REQ_LPUART1_TX
474   *         @arg @ref LL_DMAMUX_REQ_ADC2
475   *         @arg @ref LL_DMAMUX_REQ_ADC3 (*)
476   *         @arg @ref LL_DMAMUX_REQ_ADC4 (*)
477   *         @arg @ref LL_DMAMUX_REQ_ADC5 (*)
478   *         @arg @ref LL_DMAMUX_REQ_QSPI (*)
479   *         @arg @ref LL_DMAMUX_REQ_DAC2_CH1 (*)
480   *         @arg @ref LL_DMAMUX_REQ_TIM1_CH1
481   *         @arg @ref LL_DMAMUX_REQ_TIM1_CH2
482   *         @arg @ref LL_DMAMUX_REQ_TIM1_CH3
483   *         @arg @ref LL_DMAMUX_REQ_TIM1_CH4
484   *         @arg @ref LL_DMAMUX_REQ_TIM1_UP
485   *         @arg @ref LL_DMAMUX_REQ_TIM1_TRIG
486   *         @arg @ref LL_DMAMUX_REQ_TIM1_COM
487   *         @arg @ref LL_DMAMUX_REQ_TIM8_CH1
488   *         @arg @ref LL_DMAMUX_REQ_TIM8_CH2
489   *         @arg @ref LL_DMAMUX_REQ_TIM8_CH3
490   *         @arg @ref LL_DMAMUX_REQ_TIM8_CH4
491   *         @arg @ref LL_DMAMUX_REQ_TIM8_UP
492   *         @arg @ref LL_DMAMUX_REQ_TIM8_TRIG
493   *         @arg @ref LL_DMAMUX_REQ_TIM8_COM
494   *         @arg @ref LL_DMAMUX_REQ_TIM2_CH1
495   *         @arg @ref LL_DMAMUX_REQ_TIM2_CH2
496   *         @arg @ref LL_DMAMUX_REQ_TIM2_CH3
497   *         @arg @ref LL_DMAMUX_REQ_TIM2_CH4
498   *         @arg @ref LL_DMAMUX_REQ_TIM2_UP
499   *         @arg @ref LL_DMAMUX_REQ_TIM3_CH1
500   *         @arg @ref LL_DMAMUX_REQ_TIM3_CH2
501   *         @arg @ref LL_DMAMUX_REQ_TIM3_CH3
502   *         @arg @ref LL_DMAMUX_REQ_TIM3_CH4
503   *         @arg @ref LL_DMAMUX_REQ_TIM3_UP
504   *         @arg @ref LL_DMAMUX_REQ_TIM3_TRIG
505   *         @arg @ref LL_DMAMUX_REQ_TIM4_CH1
506   *         @arg @ref LL_DMAMUX_REQ_TIM4_CH2
507   *         @arg @ref LL_DMAMUX_REQ_TIM4_CH3
508   *         @arg @ref LL_DMAMUX_REQ_TIM4_CH4
509   *         @arg @ref LL_DMAMUX_REQ_TIM4_UP
510   *         @arg @ref LL_DMAMUX_REQ_TIM5_CH1 (*)
511   *         @arg @ref LL_DMAMUX_REQ_TIM5_CH2 (*)
512   *         @arg @ref LL_DMAMUX_REQ_TIM5_CH3 (*)
513   *         @arg @ref LL_DMAMUX_REQ_TIM5_CH4 (*)
514   *         @arg @ref LL_DMAMUX_REQ_TIM5_UP (*)
515   *         @arg @ref LL_DMAMUX_REQ_TIM5_TRIG (*)
516   *         @arg @ref LL_DMAMUX_REQ_TIM15_CH1
517   *         @arg @ref LL_DMAMUX_REQ_TIM15_UP
518   *         @arg @ref LL_DMAMUX_REQ_TIM15_TRIG
519   *         @arg @ref LL_DMAMUX_REQ_TIM15_COM
520   *         @arg @ref LL_DMAMUX_REQ_TIM16_CH1
521   *         @arg @ref LL_DMAMUX_REQ_TIM16_UP
522   *         @arg @ref LL_DMAMUX_REQ_TIM17_CH1
523   *         @arg @ref LL_DMAMUX_REQ_TIM17_UP
524   *         @arg @ref LL_DMAMUX_REQ_TIM20_CH1 (*)
525   *         @arg @ref LL_DMAMUX_REQ_TIM20_CH2 (*)
526   *         @arg @ref LL_DMAMUX_REQ_TIM20_CH3 (*)
527   *         @arg @ref LL_DMAMUX_REQ_TIM20_CH4 (*)
528   *         @arg @ref LL_DMAMUX_REQ_TIM20_UP (*)
529   *         @arg @ref LL_DMAMUX_REQ_AES_IN
530   *         @arg @ref LL_DMAMUX_REQ_AES_OUT
531   *         @arg @ref LL_DMAMUX_REQ_TIM20_TRIG (*)
532   *         @arg @ref LL_DMAMUX_REQ_TIM20_COM (*)
533   *         @arg @ref LL_DMAMUX_REQ_HRTIM1_M (*)
534   *         @arg @ref LL_DMAMUX_REQ_HRTIM1_A (*)
535   *         @arg @ref LL_DMAMUX_REQ_HRTIM1_B (*)
536   *         @arg @ref LL_DMAMUX_REQ_HRTIM1_C (*)
537   *         @arg @ref LL_DMAMUX_REQ_HRTIM1_D (*)
538   *         @arg @ref LL_DMAMUX_REQ_HRTIM1_E (*)
539   *         @arg @ref LL_DMAMUX_REQ_HRTIM1_F (*)
540   *         @arg @ref LL_DMAMUX_REQ_DAC3_CH1
541   *         @arg @ref LL_DMAMUX_REQ_DAC3_CH2
542   *         @arg @ref LL_DMAMUX_REQ_DAC4_CH1 (*)
543   *         @arg @ref LL_DMAMUX_REQ_DAC4_CH2 (*)
544   *         @arg @ref LL_DMAMUX_REQ_SPI4_RX (*)
545   *         @arg @ref LL_DMAMUX_REQ_SPI4_TX (*)
546   *         @arg @ref LL_DMAMUX_REQ_SAI1_A
547   *         @arg @ref LL_DMAMUX_REQ_SAI1_B
548   *         @arg @ref LL_DMAMUX_REQ_FMAC_WRITE
549   *         @arg @ref LL_DMAMUX_REQ_FMAC_WRITE
550   *         @arg @ref LL_DMAMUX_REQ_CORDIC_WRITE
551   *         @arg @ref LL_DMAMUX_REQ_CORDIC_READ
552   *         @arg @ref LL_DMAMUX_REQ_UCPD1_RX
553   *         @arg @ref LL_DMAMUX_REQ_UCPD1_TX
554   *         (*) Not on all G4 devices
555   * @retval None
556   */
LL_DMAMUX_SetRequestID(DMAMUX_Channel_TypeDef * DMAMUXx,uint32_t Channel,uint32_t Request)557 __STATIC_INLINE void LL_DMAMUX_SetRequestID(DMAMUX_Channel_TypeDef *DMAMUXx, uint32_t Channel, uint32_t Request)
558 {
559   (void)(DMAMUXx);
560   MODIFY_REG((DMAMUX1_Channel0 + Channel)->CCR, DMAMUX_CxCR_DMAREQ_ID, Request);
561 }
562 
563 /**
564   * @brief  Get DMAMUX request ID for DMAMUX Channel x.
565   * @note   DMAMUX channel 0 to 7 are mapped to DMA1 channel 1 to 8.
566   *         DMAMUX channel 8 to 15 are mapped to DMA2 channel 1 to 8.
567   * @rmtoll CxCR         DMAREQ_ID     LL_DMAMUX_GetRequestID
568   * @param  DMAMUXx DMAMUXx Instance
569   * @param  Channel This parameter can be one of the following values:
570   *         @arg @ref LL_DMAMUX_CHANNEL_0
571   *         @arg @ref LL_DMAMUX_CHANNEL_1
572   *         @arg @ref LL_DMAMUX_CHANNEL_2
573   *         @arg @ref LL_DMAMUX_CHANNEL_3
574   *         @arg @ref LL_DMAMUX_CHANNEL_4
575   *         @arg @ref LL_DMAMUX_CHANNEL_5
576   *         @arg @ref LL_DMAMUX_CHANNEL_6
577   *         @arg @ref LL_DMAMUX_CHANNEL_7
578   *         @arg @ref LL_DMAMUX_CHANNEL_8
579   *         @arg @ref LL_DMAMUX_CHANNEL_9
580   *         @arg @ref LL_DMAMUX_CHANNEL_10
581   *         @arg @ref LL_DMAMUX_CHANNEL_11
582   *         @arg @ref LL_DMAMUX_CHANNEL_12
583   *         @arg @ref LL_DMAMUX_CHANNEL_13
584   *         @arg @ref LL_DMAMUX_CHANNEL_14
585   *         @arg @ref LL_DMAMUX_CHANNEL_15
586   *         (*) Not on all G4 devices
587   * @retval Returned value can be one of the following values:
588   *         @arg @ref LL_DMAMUX_REQ_MEM2MEM
589   *         @arg @ref LL_DMAMUX_REQ_GENERATOR0
590   *         @arg @ref LL_DMAMUX_REQ_GENERATOR0
591   *         @arg @ref LL_DMAMUX_REQ_GENERATOR1
592   *         @arg @ref LL_DMAMUX_REQ_GENERATOR2
593   *         @arg @ref LL_DMAMUX_REQ_GENERATOR3
594   *         @arg @ref LL_DMAMUX_REQ_ADC1
595   *         @arg @ref LL_DMAMUX_REQ_DAC1_CH1
596   *         @arg @ref LL_DMAMUX_REQ_DAC1_CH2
597   *         @arg @ref LL_DMAMUX_REQ_TIM6_UP
598   *         @arg @ref LL_DMAMUX_REQ_TIM7_UP
599   *         @arg @ref LL_DMAMUX_REQ_SPI1_RX
600   *         @arg @ref LL_DMAMUX_REQ_SPI1_TX
601   *         @arg @ref LL_DMAMUX_REQ_SPI2_RX
602   *         @arg @ref LL_DMAMUX_REQ_SPI2_TX
603   *         @arg @ref LL_DMAMUX_REQ_SPI3_RX
604   *         @arg @ref LL_DMAMUX_REQ_SPI3_TX
605   *         @arg @ref LL_DMAMUX_REQ_I2C1_RX
606   *         @arg @ref LL_DMAMUX_REQ_I2C1_TX
607   *         @arg @ref LL_DMAMUX_REQ_I2C2_RX
608   *         @arg @ref LL_DMAMUX_REQ_I2C2_TX
609   *         @arg @ref LL_DMAMUX_REQ_I2C3_RX
610   *         @arg @ref LL_DMAMUX_REQ_I2C3_TX (*)
611   *         @arg @ref LL_DMAMUX_REQ_I2C4_RX (*)
612   *         @arg @ref LL_DMAMUX_REQ_I2C4_TX
613   *         @arg @ref LL_DMAMUX_REQ_USART1_RX
614   *         @arg @ref LL_DMAMUX_REQ_USART1_TX
615   *         @arg @ref LL_DMAMUX_REQ_USART2_RX
616   *         @arg @ref LL_DMAMUX_REQ_USART2_TX
617   *         @arg @ref LL_DMAMUX_REQ_USART3_RX
618   *         @arg @ref LL_DMAMUX_REQ_USART3_TX
619   *         @arg @ref LL_DMAMUX_REQ_UART4_RX
620   *         @arg @ref LL_DMAMUX_REQ_UART4_TX
621   *         @arg @ref LL_DMAMUX_REQ_UART5_RX (*)
622   *         @arg @ref LL_DMAMUX_REQ_UART5_TX (*)
623   *         @arg @ref LL_DMAMUX_REQ_LPUART1_RX
624   *         @arg @ref LL_DMAMUX_REQ_LPUART1_TX
625   *         @arg @ref LL_DMAMUX_REQ_ADC2
626   *         @arg @ref LL_DMAMUX_REQ_ADC3 (*)
627   *         @arg @ref LL_DMAMUX_REQ_ADC4 (*)
628   *         @arg @ref LL_DMAMUX_REQ_ADC5 (*)
629   *         @arg @ref LL_DMAMUX_REQ_QSPI (*)
630   *         @arg @ref LL_DMAMUX_REQ_DAC2_CH1 (*)
631   *         @arg @ref LL_DMAMUX_REQ_TIM1_CH1
632   *         @arg @ref LL_DMAMUX_REQ_TIM1_CH2
633   *         @arg @ref LL_DMAMUX_REQ_TIM1_CH3
634   *         @arg @ref LL_DMAMUX_REQ_TIM1_CH4
635   *         @arg @ref LL_DMAMUX_REQ_TIM1_UP
636   *         @arg @ref LL_DMAMUX_REQ_TIM1_TRIG
637   *         @arg @ref LL_DMAMUX_REQ_TIM1_COM
638   *         @arg @ref LL_DMAMUX_REQ_TIM8_CH1
639   *         @arg @ref LL_DMAMUX_REQ_TIM8_CH2
640   *         @arg @ref LL_DMAMUX_REQ_TIM8_CH3
641   *         @arg @ref LL_DMAMUX_REQ_TIM8_CH4
642   *         @arg @ref LL_DMAMUX_REQ_TIM8_UP
643   *         @arg @ref LL_DMAMUX_REQ_TIM8_TRIG
644   *         @arg @ref LL_DMAMUX_REQ_TIM8_COM
645   *         @arg @ref LL_DMAMUX_REQ_TIM2_CH1
646   *         @arg @ref LL_DMAMUX_REQ_TIM2_CH2
647   *         @arg @ref LL_DMAMUX_REQ_TIM2_CH3
648   *         @arg @ref LL_DMAMUX_REQ_TIM2_CH4
649   *         @arg @ref LL_DMAMUX_REQ_TIM2_UP
650   *         @arg @ref LL_DMAMUX_REQ_TIM3_CH1
651   *         @arg @ref LL_DMAMUX_REQ_TIM3_CH2
652   *         @arg @ref LL_DMAMUX_REQ_TIM3_CH3
653   *         @arg @ref LL_DMAMUX_REQ_TIM3_CH4
654   *         @arg @ref LL_DMAMUX_REQ_TIM3_UP
655   *         @arg @ref LL_DMAMUX_REQ_TIM3_TRIG
656   *         @arg @ref LL_DMAMUX_REQ_TIM4_CH1
657   *         @arg @ref LL_DMAMUX_REQ_TIM4_CH2
658   *         @arg @ref LL_DMAMUX_REQ_TIM4_CH3
659   *         @arg @ref LL_DMAMUX_REQ_TIM4_CH4
660   *         @arg @ref LL_DMAMUX_REQ_TIM4_UP
661   *         @arg @ref LL_DMAMUX_REQ_TIM5_CH1 (*)
662   *         @arg @ref LL_DMAMUX_REQ_TIM5_CH2 (*)
663   *         @arg @ref LL_DMAMUX_REQ_TIM5_CH3 (*)
664   *         @arg @ref LL_DMAMUX_REQ_TIM5_CH4 (*)
665   *         @arg @ref LL_DMAMUX_REQ_TIM5_UP (*)
666   *         @arg @ref LL_DMAMUX_REQ_TIM5_TRIG (*)
667   *         @arg @ref LL_DMAMUX_REQ_TIM15_CH1
668   *         @arg @ref LL_DMAMUX_REQ_TIM15_UP
669   *         @arg @ref LL_DMAMUX_REQ_TIM15_TRIG
670   *         @arg @ref LL_DMAMUX_REQ_TIM15_COM
671   *         @arg @ref LL_DMAMUX_REQ_TIM16_CH1
672   *         @arg @ref LL_DMAMUX_REQ_TIM16_UP
673   *         @arg @ref LL_DMAMUX_REQ_TIM17_CH1
674   *         @arg @ref LL_DMAMUX_REQ_TIM17_UP
675   *         @arg @ref LL_DMAMUX_REQ_TIM20_CH1 (*)
676   *         @arg @ref LL_DMAMUX_REQ_TIM20_CH2 (*)
677   *         @arg @ref LL_DMAMUX_REQ_TIM20_CH3 (*)
678   *         @arg @ref LL_DMAMUX_REQ_TIM20_CH4 (*)
679   *         @arg @ref LL_DMAMUX_REQ_TIM20_UP (*)
680   *         @arg @ref LL_DMAMUX_REQ_AES_IN
681   *         @arg @ref LL_DMAMUX_REQ_AES_OUT
682   *         @arg @ref LL_DMAMUX_REQ_TIM20_TRIG (*)
683   *         @arg @ref LL_DMAMUX_REQ_TIM20_COM (*)
684   *         @arg @ref LL_DMAMUX_REQ_HRTIM1_M (*)
685   *         @arg @ref LL_DMAMUX_REQ_HRTIM1_A (*)
686   *         @arg @ref LL_DMAMUX_REQ_HRTIM1_B (*)
687   *         @arg @ref LL_DMAMUX_REQ_HRTIM1_C (*)
688   *         @arg @ref LL_DMAMUX_REQ_HRTIM1_D (*)
689   *         @arg @ref LL_DMAMUX_REQ_HRTIM1_E (*)
690   *         @arg @ref LL_DMAMUX_REQ_HRTIM1_F (*)
691   *         @arg @ref LL_DMAMUX_REQ_DAC3_CH1
692   *         @arg @ref LL_DMAMUX_REQ_DAC3_CH2
693   *         @arg @ref LL_DMAMUX_REQ_DAC4_CH1 (*)
694   *         @arg @ref LL_DMAMUX_REQ_DAC4_CH2 (*)
695   *         @arg @ref LL_DMAMUX_REQ_SPI4_RX (*)
696   *         @arg @ref LL_DMAMUX_REQ_SPI4_TX (*)
697   *         @arg @ref LL_DMAMUX_REQ_SAI1_A
698   *         @arg @ref LL_DMAMUX_REQ_SAI1_B
699   *         @arg @ref LL_DMAMUX_REQ_FMAC_WRITE
700   *         @arg @ref LL_DMAMUX_REQ_FMAC_WRITE
701   *         @arg @ref LL_DMAMUX_REQ_CORDIC_WRITE
702   *         @arg @ref LL_DMAMUX_REQ_CORDIC_READ
703   *         @arg @ref LL_DMAMUX_REQ_UCPD1_RX
704   *         @arg @ref LL_DMAMUX_REQ_UCPD1_TX
705   *         (*) Not on all G4 devices
706   */
LL_DMAMUX_GetRequestID(DMAMUX_Channel_TypeDef * DMAMUXx,uint32_t Channel)707 __STATIC_INLINE uint32_t LL_DMAMUX_GetRequestID(DMAMUX_Channel_TypeDef *DMAMUXx, uint32_t Channel)
708 {
709   (void)(DMAMUXx);
710   return (uint32_t)(READ_BIT((DMAMUX1_Channel0 + Channel)->CCR, DMAMUX_CxCR_DMAREQ_ID));
711 }
712 
713 /**
714   * @brief  Set the number of DMA request that will be autorized after a synchronization event and/or the number of DMA request needed to generate an event.
715   * @rmtoll CxCR         NBREQ         LL_DMAMUX_SetSyncRequestNb
716   * @param  DMAMUXx DMAMUXx Instance
717   * @param  Channel This parameter can be one of the following values:
718   *         @arg @ref LL_DMAMUX_CHANNEL_0
719   *         @arg @ref LL_DMAMUX_CHANNEL_1
720   *         @arg @ref LL_DMAMUX_CHANNEL_2
721   *         @arg @ref LL_DMAMUX_CHANNEL_3
722   *         @arg @ref LL_DMAMUX_CHANNEL_4
723   *         @arg @ref LL_DMAMUX_CHANNEL_5
724   *         @arg @ref LL_DMAMUX_CHANNEL_6
725   *         @arg @ref LL_DMAMUX_CHANNEL_7
726   *         @arg @ref LL_DMAMUX_CHANNEL_8
727   *         @arg @ref LL_DMAMUX_CHANNEL_9
728   *         @arg @ref LL_DMAMUX_CHANNEL_10
729   *         @arg @ref LL_DMAMUX_CHANNEL_11
730   *         @arg @ref LL_DMAMUX_CHANNEL_12
731   *         @arg @ref LL_DMAMUX_CHANNEL_13
732   *         @arg @ref LL_DMAMUX_CHANNEL_14
733   *         @arg @ref LL_DMAMUX_CHANNEL_15
734   * @param  RequestNb This parameter must be a value between Min_Data = 1 and Max_Data = 32.
735   * @retval None
736   */
LL_DMAMUX_SetSyncRequestNb(DMAMUX_Channel_TypeDef * DMAMUXx,uint32_t Channel,uint32_t RequestNb)737 __STATIC_INLINE void LL_DMAMUX_SetSyncRequestNb(DMAMUX_Channel_TypeDef *DMAMUXx, uint32_t Channel, uint32_t RequestNb)
738 {
739   (void)(DMAMUXx);
740   MODIFY_REG((DMAMUX1_Channel0 + Channel)->CCR, DMAMUX_CxCR_NBREQ, ((RequestNb - 1U) << DMAMUX_CxCR_NBREQ_Pos));
741 }
742 
743 /**
744   * @brief  Get the number of DMA request that will be autorized after a synchronization event and/or the number of DMA request needed to generate an event.
745   * @rmtoll CxCR         NBREQ         LL_DMAMUX_GetSyncRequestNb
746   * @param  DMAMUXx DMAMUXx Instance
747   * @param  Channel This parameter can be one of the following values:
748   *         @arg @ref LL_DMAMUX_CHANNEL_0
749   *         @arg @ref LL_DMAMUX_CHANNEL_1
750   *         @arg @ref LL_DMAMUX_CHANNEL_2
751   *         @arg @ref LL_DMAMUX_CHANNEL_3
752   *         @arg @ref LL_DMAMUX_CHANNEL_4
753   *         @arg @ref LL_DMAMUX_CHANNEL_5
754   *         @arg @ref LL_DMAMUX_CHANNEL_6
755   *         @arg @ref LL_DMAMUX_CHANNEL_7
756   *         @arg @ref LL_DMAMUX_CHANNEL_8
757   *         @arg @ref LL_DMAMUX_CHANNEL_9
758   *         @arg @ref LL_DMAMUX_CHANNEL_10
759   *         @arg @ref LL_DMAMUX_CHANNEL_11
760   *         @arg @ref LL_DMAMUX_CHANNEL_12
761   *         @arg @ref LL_DMAMUX_CHANNEL_13
762   *         @arg @ref LL_DMAMUX_CHANNEL_14
763   *         @arg @ref LL_DMAMUX_CHANNEL_15
764   * @retval Between Min_Data = 1 and Max_Data = 32
765   */
LL_DMAMUX_GetSyncRequestNb(DMAMUX_Channel_TypeDef * DMAMUXx,uint32_t Channel)766 __STATIC_INLINE uint32_t LL_DMAMUX_GetSyncRequestNb(DMAMUX_Channel_TypeDef *DMAMUXx, uint32_t Channel)
767 {
768   (void)(DMAMUXx);
769   return (uint32_t)(((READ_BIT((DMAMUX1_Channel0 + Channel)->CCR, DMAMUX_CxCR_NBREQ)) >> DMAMUX_CxCR_NBREQ_Pos) + 1U);
770 }
771 
772 /**
773   * @brief  Set the polarity of the signal on which the DMA request is synchronized.
774   * @rmtoll CxCR         SPOL          LL_DMAMUX_SetSyncPolarity
775   * @param  DMAMUXx DMAMUXx Instance
776   * @param  Channel This parameter can be one of the following values:
777   *         @arg @ref LL_DMAMUX_CHANNEL_0
778   *         @arg @ref LL_DMAMUX_CHANNEL_1
779   *         @arg @ref LL_DMAMUX_CHANNEL_2
780   *         @arg @ref LL_DMAMUX_CHANNEL_3
781   *         @arg @ref LL_DMAMUX_CHANNEL_4
782   *         @arg @ref LL_DMAMUX_CHANNEL_5
783   *         @arg @ref LL_DMAMUX_CHANNEL_6
784   *         @arg @ref LL_DMAMUX_CHANNEL_7
785   *         @arg @ref LL_DMAMUX_CHANNEL_8
786   *         @arg @ref LL_DMAMUX_CHANNEL_9
787   *         @arg @ref LL_DMAMUX_CHANNEL_10
788   *         @arg @ref LL_DMAMUX_CHANNEL_11
789   *         @arg @ref LL_DMAMUX_CHANNEL_12
790   *         @arg @ref LL_DMAMUX_CHANNEL_13
791   *         @arg @ref LL_DMAMUX_CHANNEL_14
792   *         @arg @ref LL_DMAMUX_CHANNEL_15
793   * @param  Polarity This parameter can be one of the following values:
794   *         @arg @ref LL_DMAMUX_SYNC_NO_EVENT
795   *         @arg @ref LL_DMAMUX_SYNC_POL_RISING
796   *         @arg @ref LL_DMAMUX_SYNC_POL_FALLING
797   *         @arg @ref LL_DMAMUX_SYNC_POL_RISING_FALLING
798   * @retval None
799   */
LL_DMAMUX_SetSyncPolarity(DMAMUX_Channel_TypeDef * DMAMUXx,uint32_t Channel,uint32_t Polarity)800 __STATIC_INLINE void LL_DMAMUX_SetSyncPolarity(DMAMUX_Channel_TypeDef *DMAMUXx, uint32_t Channel, uint32_t Polarity)
801 {
802   (void)(DMAMUXx);
803   MODIFY_REG((DMAMUX1_Channel0 + Channel)->CCR, DMAMUX_CxCR_SPOL, Polarity);
804 }
805 
806 /**
807   * @brief  Get the polarity of the signal on which the DMA request is synchronized.
808   * @rmtoll CxCR         SPOL          LL_DMAMUX_GetSyncPolarity
809   * @param  DMAMUXx DMAMUXx Instance
810   * @param  Channel This parameter can be one of the following values:
811   *         @arg @ref LL_DMAMUX_CHANNEL_0
812   *         @arg @ref LL_DMAMUX_CHANNEL_1
813   *         @arg @ref LL_DMAMUX_CHANNEL_2
814   *         @arg @ref LL_DMAMUX_CHANNEL_3
815   *         @arg @ref LL_DMAMUX_CHANNEL_4
816   *         @arg @ref LL_DMAMUX_CHANNEL_5
817   *         @arg @ref LL_DMAMUX_CHANNEL_6
818   *         @arg @ref LL_DMAMUX_CHANNEL_7
819   *         @arg @ref LL_DMAMUX_CHANNEL_8
820   *         @arg @ref LL_DMAMUX_CHANNEL_9
821   *         @arg @ref LL_DMAMUX_CHANNEL_10
822   *         @arg @ref LL_DMAMUX_CHANNEL_11
823   *         @arg @ref LL_DMAMUX_CHANNEL_12
824   *         @arg @ref LL_DMAMUX_CHANNEL_13
825   *         @arg @ref LL_DMAMUX_CHANNEL_14
826   *         @arg @ref LL_DMAMUX_CHANNEL_15
827   * @retval Returned value can be one of the following values:
828   *         @arg @ref LL_DMAMUX_SYNC_NO_EVENT
829   *         @arg @ref LL_DMAMUX_SYNC_POL_RISING
830   *         @arg @ref LL_DMAMUX_SYNC_POL_FALLING
831   *         @arg @ref LL_DMAMUX_SYNC_POL_RISING_FALLING
832   */
LL_DMAMUX_GetSyncPolarity(DMAMUX_Channel_TypeDef * DMAMUXx,uint32_t Channel)833 __STATIC_INLINE uint32_t LL_DMAMUX_GetSyncPolarity(DMAMUX_Channel_TypeDef *DMAMUXx, uint32_t Channel)
834 {
835   (void)(DMAMUXx);
836   return (uint32_t)(READ_BIT((DMAMUX1_Channel0 + Channel)->CCR, DMAMUX_CxCR_SPOL));
837 }
838 
839 /**
840   * @brief  Enable the Event Generation on DMAMUX channel x.
841   * @rmtoll CxCR         EGE           LL_DMAMUX_EnableEventGeneration
842   * @param  DMAMUXx DMAMUXx Instance
843   * @param  Channel This parameter can be one of the following values:
844   *         @arg @ref LL_DMAMUX_CHANNEL_0
845   *         @arg @ref LL_DMAMUX_CHANNEL_1
846   *         @arg @ref LL_DMAMUX_CHANNEL_2
847   *         @arg @ref LL_DMAMUX_CHANNEL_3
848   *         @arg @ref LL_DMAMUX_CHANNEL_4
849   *         @arg @ref LL_DMAMUX_CHANNEL_5
850   *         @arg @ref LL_DMAMUX_CHANNEL_6
851   *         @arg @ref LL_DMAMUX_CHANNEL_7
852   *         @arg @ref LL_DMAMUX_CHANNEL_8
853   *         @arg @ref LL_DMAMUX_CHANNEL_9
854   *         @arg @ref LL_DMAMUX_CHANNEL_10
855   *         @arg @ref LL_DMAMUX_CHANNEL_11
856   *         @arg @ref LL_DMAMUX_CHANNEL_12
857   *         @arg @ref LL_DMAMUX_CHANNEL_13
858   *         @arg @ref LL_DMAMUX_CHANNEL_14
859   *         @arg @ref LL_DMAMUX_CHANNEL_15
860   * @retval None
861   */
LL_DMAMUX_EnableEventGeneration(DMAMUX_Channel_TypeDef * DMAMUXx,uint32_t Channel)862 __STATIC_INLINE void LL_DMAMUX_EnableEventGeneration(DMAMUX_Channel_TypeDef *DMAMUXx, uint32_t Channel)
863 {
864   (void)(DMAMUXx);
865   SET_BIT((DMAMUX1_Channel0 + Channel)->CCR, DMAMUX_CxCR_EGE);
866 }
867 
868 /**
869   * @brief  Disable the Event Generation on DMAMUX channel x.
870   * @rmtoll CxCR         EGE           LL_DMAMUX_DisableEventGeneration
871   * @param  DMAMUXx DMAMUXx Instance
872   * @param  Channel This parameter can be one of the following values:
873   *         @arg @ref LL_DMAMUX_CHANNEL_0
874   *         @arg @ref LL_DMAMUX_CHANNEL_1
875   *         @arg @ref LL_DMAMUX_CHANNEL_2
876   *         @arg @ref LL_DMAMUX_CHANNEL_3
877   *         @arg @ref LL_DMAMUX_CHANNEL_4
878   *         @arg @ref LL_DMAMUX_CHANNEL_5
879   *         @arg @ref LL_DMAMUX_CHANNEL_6
880   *         @arg @ref LL_DMAMUX_CHANNEL_7
881   *         @arg @ref LL_DMAMUX_CHANNEL_8
882   *         @arg @ref LL_DMAMUX_CHANNEL_9
883   *         @arg @ref LL_DMAMUX_CHANNEL_10
884   *         @arg @ref LL_DMAMUX_CHANNEL_11
885   *         @arg @ref LL_DMAMUX_CHANNEL_12
886   *         @arg @ref LL_DMAMUX_CHANNEL_13
887   *         @arg @ref LL_DMAMUX_CHANNEL_14
888   *         @arg @ref LL_DMAMUX_CHANNEL_15
889   * @retval None
890   */
LL_DMAMUX_DisableEventGeneration(DMAMUX_Channel_TypeDef * DMAMUXx,uint32_t Channel)891 __STATIC_INLINE void LL_DMAMUX_DisableEventGeneration(DMAMUX_Channel_TypeDef *DMAMUXx, uint32_t Channel)
892 {
893   (void)(DMAMUXx);
894   CLEAR_BIT((DMAMUX1_Channel0 + Channel)->CCR, DMAMUX_CxCR_EGE);
895 }
896 
897 /**
898   * @brief  Check if the Event Generation on DMAMUX channel x is enabled or disabled.
899   * @rmtoll CxCR         EGE           LL_DMAMUX_IsEnabledEventGeneration
900   * @param  DMAMUXx DMAMUXx Instance
901   * @param  Channel This parameter can be one of the following values:
902   *         @arg @ref LL_DMAMUX_CHANNEL_0
903   *         @arg @ref LL_DMAMUX_CHANNEL_1
904   *         @arg @ref LL_DMAMUX_CHANNEL_2
905   *         @arg @ref LL_DMAMUX_CHANNEL_3
906   *         @arg @ref LL_DMAMUX_CHANNEL_4
907   *         @arg @ref LL_DMAMUX_CHANNEL_5
908   *         @arg @ref LL_DMAMUX_CHANNEL_6
909   *         @arg @ref LL_DMAMUX_CHANNEL_7
910   *         @arg @ref LL_DMAMUX_CHANNEL_8
911   *         @arg @ref LL_DMAMUX_CHANNEL_9
912   *         @arg @ref LL_DMAMUX_CHANNEL_10
913   *         @arg @ref LL_DMAMUX_CHANNEL_11
914   *         @arg @ref LL_DMAMUX_CHANNEL_12
915   *         @arg @ref LL_DMAMUX_CHANNEL_13
916   *         @arg @ref LL_DMAMUX_CHANNEL_14
917   *         @arg @ref LL_DMAMUX_CHANNEL_15
918   * @retval State of bit (1 or 0).
919   */
LL_DMAMUX_IsEnabledEventGeneration(DMAMUX_Channel_TypeDef * DMAMUXx,uint32_t Channel)920 __STATIC_INLINE uint32_t LL_DMAMUX_IsEnabledEventGeneration(DMAMUX_Channel_TypeDef *DMAMUXx, uint32_t Channel)
921 {
922   (void)(DMAMUXx);
923   return ((READ_BIT((DMAMUX1_Channel0 + Channel)->CCR, DMAMUX_CxCR_EGE) == (DMAMUX_CxCR_EGE))? 1UL : 0UL);
924 }
925 
926 /**
927   * @brief  Enable the synchronization mode.
928   * @rmtoll CxCR         SE            LL_DMAMUX_EnableSync
929   * @param  DMAMUXx DMAMUXx Instance
930   * @param  Channel This parameter can be one of the following values:
931   *         @arg @ref LL_DMAMUX_CHANNEL_0
932   *         @arg @ref LL_DMAMUX_CHANNEL_1
933   *         @arg @ref LL_DMAMUX_CHANNEL_2
934   *         @arg @ref LL_DMAMUX_CHANNEL_3
935   *         @arg @ref LL_DMAMUX_CHANNEL_4
936   *         @arg @ref LL_DMAMUX_CHANNEL_5
937   *         @arg @ref LL_DMAMUX_CHANNEL_6
938   *         @arg @ref LL_DMAMUX_CHANNEL_7
939   *         @arg @ref LL_DMAMUX_CHANNEL_8
940   *         @arg @ref LL_DMAMUX_CHANNEL_9
941   *         @arg @ref LL_DMAMUX_CHANNEL_10
942   *         @arg @ref LL_DMAMUX_CHANNEL_11
943   *         @arg @ref LL_DMAMUX_CHANNEL_12
944   *         @arg @ref LL_DMAMUX_CHANNEL_13
945   *         @arg @ref LL_DMAMUX_CHANNEL_14
946   *         @arg @ref LL_DMAMUX_CHANNEL_15
947   * @retval None
948   */
LL_DMAMUX_EnableSync(DMAMUX_Channel_TypeDef * DMAMUXx,uint32_t Channel)949 __STATIC_INLINE void LL_DMAMUX_EnableSync(DMAMUX_Channel_TypeDef *DMAMUXx, uint32_t Channel)
950 {
951   (void)(DMAMUXx);
952   SET_BIT((DMAMUX1_Channel0 + Channel)->CCR, DMAMUX_CxCR_SE);
953 }
954 
955 /**
956   * @brief  Disable the synchronization mode.
957   * @rmtoll CxCR         SE            LL_DMAMUX_DisableSync
958   * @param  DMAMUXx DMAMUXx Instance
959   * @param  Channel This parameter can be one of the following values:
960   *         @arg @ref LL_DMAMUX_CHANNEL_0
961   *         @arg @ref LL_DMAMUX_CHANNEL_1
962   *         @arg @ref LL_DMAMUX_CHANNEL_2
963   *         @arg @ref LL_DMAMUX_CHANNEL_3
964   *         @arg @ref LL_DMAMUX_CHANNEL_4
965   *         @arg @ref LL_DMAMUX_CHANNEL_5
966   *         @arg @ref LL_DMAMUX_CHANNEL_6
967   *         @arg @ref LL_DMAMUX_CHANNEL_7
968   *         @arg @ref LL_DMAMUX_CHANNEL_8
969   *         @arg @ref LL_DMAMUX_CHANNEL_9
970   *         @arg @ref LL_DMAMUX_CHANNEL_10
971   *         @arg @ref LL_DMAMUX_CHANNEL_11
972   *         @arg @ref LL_DMAMUX_CHANNEL_12
973   *         @arg @ref LL_DMAMUX_CHANNEL_13
974   *         @arg @ref LL_DMAMUX_CHANNEL_14
975   *         @arg @ref LL_DMAMUX_CHANNEL_15
976   * @retval None
977   */
LL_DMAMUX_DisableSync(DMAMUX_Channel_TypeDef * DMAMUXx,uint32_t Channel)978 __STATIC_INLINE void LL_DMAMUX_DisableSync(DMAMUX_Channel_TypeDef *DMAMUXx, uint32_t Channel)
979 {
980   (void)(DMAMUXx);
981   CLEAR_BIT((DMAMUX1_Channel0 + Channel)->CCR, DMAMUX_CxCR_SE);
982 }
983 
984 /**
985   * @brief  Check if the synchronization mode is enabled or disabled.
986   * @rmtoll CxCR         SE            LL_DMAMUX_IsEnabledSync
987   * @param  DMAMUXx DMAMUXx Instance
988   * @param  Channel This parameter can be one of the following values:
989   *         @arg @ref LL_DMAMUX_CHANNEL_0
990   *         @arg @ref LL_DMAMUX_CHANNEL_1
991   *         @arg @ref LL_DMAMUX_CHANNEL_2
992   *         @arg @ref LL_DMAMUX_CHANNEL_3
993   *         @arg @ref LL_DMAMUX_CHANNEL_4
994   *         @arg @ref LL_DMAMUX_CHANNEL_5
995   *         @arg @ref LL_DMAMUX_CHANNEL_6
996   *         @arg @ref LL_DMAMUX_CHANNEL_7
997   *         @arg @ref LL_DMAMUX_CHANNEL_8
998   *         @arg @ref LL_DMAMUX_CHANNEL_9
999   *         @arg @ref LL_DMAMUX_CHANNEL_10
1000   *         @arg @ref LL_DMAMUX_CHANNEL_11
1001   *         @arg @ref LL_DMAMUX_CHANNEL_12
1002   *         @arg @ref LL_DMAMUX_CHANNEL_13
1003   *         @arg @ref LL_DMAMUX_CHANNEL_14
1004   *         @arg @ref LL_DMAMUX_CHANNEL_15
1005   * @retval State of bit (1 or 0).
1006   */
LL_DMAMUX_IsEnabledSync(DMAMUX_Channel_TypeDef * DMAMUXx,uint32_t Channel)1007 __STATIC_INLINE uint32_t LL_DMAMUX_IsEnabledSync(DMAMUX_Channel_TypeDef *DMAMUXx, uint32_t Channel)
1008 {
1009   (void)(DMAMUXx);
1010   return ((READ_BIT((DMAMUX1_Channel0 + Channel)->CCR, DMAMUX_CxCR_SE) == (DMAMUX_CxCR_SE))? 1UL : 0UL);
1011 }
1012 
1013 /**
1014   * @brief  Set DMAMUX synchronization ID  on DMAMUX Channel x.
1015   * @rmtoll CxCR         SYNC_ID       LL_DMAMUX_SetSyncID
1016   * @param  DMAMUXx DMAMUXx Instance
1017   * @param  Channel This parameter can be one of the following values:
1018   *         @arg @ref LL_DMAMUX_CHANNEL_0
1019   *         @arg @ref LL_DMAMUX_CHANNEL_1
1020   *         @arg @ref LL_DMAMUX_CHANNEL_2
1021   *         @arg @ref LL_DMAMUX_CHANNEL_3
1022   *         @arg @ref LL_DMAMUX_CHANNEL_4
1023   *         @arg @ref LL_DMAMUX_CHANNEL_5
1024   *         @arg @ref LL_DMAMUX_CHANNEL_6
1025   *         @arg @ref LL_DMAMUX_CHANNEL_7
1026   *         @arg @ref LL_DMAMUX_CHANNEL_8
1027   *         @arg @ref LL_DMAMUX_CHANNEL_9
1028   *         @arg @ref LL_DMAMUX_CHANNEL_10
1029   *         @arg @ref LL_DMAMUX_CHANNEL_11
1030   *         @arg @ref LL_DMAMUX_CHANNEL_12
1031   *         @arg @ref LL_DMAMUX_CHANNEL_13
1032   *         @arg @ref LL_DMAMUX_CHANNEL_14
1033   *         @arg @ref LL_DMAMUX_CHANNEL_15
1034   * @param  SyncID This parameter can be one of the following values:
1035   *         @arg @ref LL_DMAMUX_SYNC_EXTI_LINE0
1036   *         @arg @ref LL_DMAMUX_SYNC_EXTI_LINE1
1037   *         @arg @ref LL_DMAMUX_SYNC_EXTI_LINE2
1038   *         @arg @ref LL_DMAMUX_SYNC_EXTI_LINE3
1039   *         @arg @ref LL_DMAMUX_SYNC_EXTI_LINE4
1040   *         @arg @ref LL_DMAMUX_SYNC_EXTI_LINE5
1041   *         @arg @ref LL_DMAMUX_SYNC_EXTI_LINE6
1042   *         @arg @ref LL_DMAMUX_SYNC_EXTI_LINE7
1043   *         @arg @ref LL_DMAMUX_SYNC_EXTI_LINE8
1044   *         @arg @ref LL_DMAMUX_SYNC_EXTI_LINE9
1045   *         @arg @ref LL_DMAMUX_SYNC_EXTI_LINE10
1046   *         @arg @ref LL_DMAMUX_SYNC_EXTI_LINE11
1047   *         @arg @ref LL_DMAMUX_SYNC_EXTI_LINE12
1048   *         @arg @ref LL_DMAMUX_SYNC_EXTI_LINE13
1049   *         @arg @ref LL_DMAMUX_SYNC_EXTI_LINE14
1050   *         @arg @ref LL_DMAMUX_SYNC_EXTI_LINE15
1051   *         @arg @ref LL_DMAMUX_SYNC_DMAMUX_CH0
1052   *         @arg @ref LL_DMAMUX_SYNC_DMAMUX_CH1
1053   *         @arg @ref LL_DMAMUX_SYNC_DMAMUX_CH2
1054   *         @arg @ref LL_DMAMUX_SYNC_DMAMUX_CH3
1055   *         @arg @ref LL_DMAMUX_SYNC_LPTIM1_OUT
1056   * @retval None
1057   */
LL_DMAMUX_SetSyncID(DMAMUX_Channel_TypeDef * DMAMUXx,uint32_t Channel,uint32_t SyncID)1058 __STATIC_INLINE void LL_DMAMUX_SetSyncID(DMAMUX_Channel_TypeDef *DMAMUXx, uint32_t Channel, uint32_t SyncID)
1059 {
1060   (void)(DMAMUXx);
1061   MODIFY_REG((DMAMUX1_Channel0 + Channel)->CCR, DMAMUX_CxCR_SYNC_ID, SyncID);
1062 }
1063 
1064 /**
1065   * @brief  Get DMAMUX synchronization ID  on DMAMUX Channel x.
1066   * @rmtoll CxCR         SYNC_ID       LL_DMAMUX_GetSyncID
1067   * @param  DMAMUXx DMAMUXx Instance
1068   * @param  Channel This parameter can be one of the following values:
1069   *         @arg @ref LL_DMAMUX_CHANNEL_0
1070   *         @arg @ref LL_DMAMUX_CHANNEL_1
1071   *         @arg @ref LL_DMAMUX_CHANNEL_2
1072   *         @arg @ref LL_DMAMUX_CHANNEL_3
1073   *         @arg @ref LL_DMAMUX_CHANNEL_4
1074   *         @arg @ref LL_DMAMUX_CHANNEL_5
1075   *         @arg @ref LL_DMAMUX_CHANNEL_6
1076   *         @arg @ref LL_DMAMUX_CHANNEL_7
1077   *         @arg @ref LL_DMAMUX_CHANNEL_8
1078   *         @arg @ref LL_DMAMUX_CHANNEL_9
1079   *         @arg @ref LL_DMAMUX_CHANNEL_10
1080   *         @arg @ref LL_DMAMUX_CHANNEL_11
1081   *         @arg @ref LL_DMAMUX_CHANNEL_12
1082   *         @arg @ref LL_DMAMUX_CHANNEL_13
1083   *         @arg @ref LL_DMAMUX_CHANNEL_14
1084   *         @arg @ref LL_DMAMUX_CHANNEL_15
1085   * @retval Returned value can be one of the following values:
1086   *         @arg @ref LL_DMAMUX_SYNC_EXTI_LINE0
1087   *         @arg @ref LL_DMAMUX_SYNC_EXTI_LINE1
1088   *         @arg @ref LL_DMAMUX_SYNC_EXTI_LINE2
1089   *         @arg @ref LL_DMAMUX_SYNC_EXTI_LINE3
1090   *         @arg @ref LL_DMAMUX_SYNC_EXTI_LINE4
1091   *         @arg @ref LL_DMAMUX_SYNC_EXTI_LINE5
1092   *         @arg @ref LL_DMAMUX_SYNC_EXTI_LINE6
1093   *         @arg @ref LL_DMAMUX_SYNC_EXTI_LINE7
1094   *         @arg @ref LL_DMAMUX_SYNC_EXTI_LINE8
1095   *         @arg @ref LL_DMAMUX_SYNC_EXTI_LINE9
1096   *         @arg @ref LL_DMAMUX_SYNC_EXTI_LINE10
1097   *         @arg @ref LL_DMAMUX_SYNC_EXTI_LINE11
1098   *         @arg @ref LL_DMAMUX_SYNC_EXTI_LINE12
1099   *         @arg @ref LL_DMAMUX_SYNC_EXTI_LINE13
1100   *         @arg @ref LL_DMAMUX_SYNC_EXTI_LINE14
1101   *         @arg @ref LL_DMAMUX_SYNC_EXTI_LINE15
1102   *         @arg @ref LL_DMAMUX_SYNC_DMAMUX_CH0
1103   *         @arg @ref LL_DMAMUX_SYNC_DMAMUX_CH1
1104   *         @arg @ref LL_DMAMUX_SYNC_DMAMUX_CH2
1105   *         @arg @ref LL_DMAMUX_SYNC_DMAMUX_CH3
1106   *         @arg @ref LL_DMAMUX_SYNC_LPTIM1_OUT
1107   */
LL_DMAMUX_GetSyncID(DMAMUX_Channel_TypeDef * DMAMUXx,uint32_t Channel)1108 __STATIC_INLINE uint32_t LL_DMAMUX_GetSyncID(DMAMUX_Channel_TypeDef *DMAMUXx, uint32_t Channel)
1109 {
1110   (void)(DMAMUXx);
1111   return (uint32_t)(READ_BIT((DMAMUX1_Channel0 + Channel)->CCR, DMAMUX_CxCR_SYNC_ID));
1112 }
1113 
1114 /**
1115   * @brief  Enable the Request Generator.
1116   * @rmtoll RGxCR        GE            LL_DMAMUX_EnableRequestGen
1117   * @param  DMAMUXx DMAMUXx Instance
1118   * @param  RequestGenChannel This parameter can be one of the following values:
1119   *         @arg @ref LL_DMAMUX_REQ_GEN_0
1120   *         @arg @ref LL_DMAMUX_REQ_GEN_1
1121   *         @arg @ref LL_DMAMUX_REQ_GEN_2
1122   *         @arg @ref LL_DMAMUX_REQ_GEN_3
1123   * @retval None
1124   */
LL_DMAMUX_EnableRequestGen(DMAMUX_Channel_TypeDef * DMAMUXx,uint32_t RequestGenChannel)1125 __STATIC_INLINE void LL_DMAMUX_EnableRequestGen(DMAMUX_Channel_TypeDef *DMAMUXx, uint32_t RequestGenChannel)
1126 {
1127   (void)(DMAMUXx);
1128   SET_BIT(((DMAMUX_RequestGen_TypeDef *)((uint32_t)((uint32_t)DMAMUX1_RequestGenerator0 + (DMAMUX_RGCR_SIZE * (RequestGenChannel)))))->RGCR, DMAMUX_RGxCR_GE);
1129 }
1130 
1131 /**
1132   * @brief  Disable the Request Generator.
1133   * @rmtoll RGxCR        GE            LL_DMAMUX_DisableRequestGen
1134   * @param  DMAMUXx DMAMUXx Instance
1135   * @param  RequestGenChannel This parameter can be one of the following values:
1136   *         @arg @ref LL_DMAMUX_REQ_GEN_0
1137   *         @arg @ref LL_DMAMUX_REQ_GEN_1
1138   *         @arg @ref LL_DMAMUX_REQ_GEN_2
1139   *         @arg @ref LL_DMAMUX_REQ_GEN_3
1140   * @retval None
1141   */
LL_DMAMUX_DisableRequestGen(DMAMUX_Channel_TypeDef * DMAMUXx,uint32_t RequestGenChannel)1142 __STATIC_INLINE void LL_DMAMUX_DisableRequestGen(DMAMUX_Channel_TypeDef *DMAMUXx, uint32_t RequestGenChannel)
1143 {
1144   (void)(DMAMUXx);
1145   CLEAR_BIT(((DMAMUX_RequestGen_TypeDef *)((uint32_t)((uint32_t)DMAMUX1_RequestGenerator0 + (DMAMUX_RGCR_SIZE * (RequestGenChannel)))))->RGCR, DMAMUX_RGxCR_GE);
1146 }
1147 
1148 /**
1149   * @brief  Check if the Request Generator is enabled or disabled.
1150   * @rmtoll RGxCR        GE            LL_DMAMUX_IsEnabledRequestGen
1151   * @param  DMAMUXx DMAMUXx Instance
1152   * @param  RequestGenChannel This parameter can be one of the following values:
1153   *         @arg @ref LL_DMAMUX_REQ_GEN_0
1154   *         @arg @ref LL_DMAMUX_REQ_GEN_1
1155   *         @arg @ref LL_DMAMUX_REQ_GEN_2
1156   *         @arg @ref LL_DMAMUX_REQ_GEN_3
1157   * @retval State of bit (1 or 0).
1158   */
LL_DMAMUX_IsEnabledRequestGen(DMAMUX_Channel_TypeDef * DMAMUXx,uint32_t RequestGenChannel)1159 __STATIC_INLINE uint32_t LL_DMAMUX_IsEnabledRequestGen(DMAMUX_Channel_TypeDef *DMAMUXx, uint32_t RequestGenChannel)
1160 {
1161   (void)(DMAMUXx);
1162   return ((READ_BIT(((DMAMUX_RequestGen_TypeDef *)((uint32_t)((uint32_t)DMAMUX1_RequestGenerator0 + (DMAMUX_RGCR_SIZE * (RequestGenChannel)))))->RGCR, DMAMUX_RGxCR_GE) == (DMAMUX_RGxCR_GE))? 1UL : 0UL);
1163 }
1164 
1165 /**
1166   * @brief  Set the polarity of the signal on which the DMA request is generated.
1167   * @rmtoll RGxCR        GPOL          LL_DMAMUX_SetRequestGenPolarity
1168   * @param  DMAMUXx DMAMUXx Instance
1169   * @param  RequestGenChannel This parameter can be one of the following values:
1170   *         @arg @ref LL_DMAMUX_REQ_GEN_0
1171   *         @arg @ref LL_DMAMUX_REQ_GEN_1
1172   *         @arg @ref LL_DMAMUX_REQ_GEN_2
1173   *         @arg @ref LL_DMAMUX_REQ_GEN_3
1174   * @param  Polarity This parameter can be one of the following values:
1175   *         @arg @ref LL_DMAMUX_REQ_GEN_NO_EVENT
1176   *         @arg @ref LL_DMAMUX_REQ_GEN_POL_RISING
1177   *         @arg @ref LL_DMAMUX_REQ_GEN_POL_FALLING
1178   *         @arg @ref LL_DMAMUX_REQ_GEN_POL_RISING_FALLING
1179   * @retval None
1180   */
LL_DMAMUX_SetRequestGenPolarity(DMAMUX_Channel_TypeDef * DMAMUXx,uint32_t RequestGenChannel,uint32_t Polarity)1181 __STATIC_INLINE void LL_DMAMUX_SetRequestGenPolarity(DMAMUX_Channel_TypeDef *DMAMUXx, uint32_t RequestGenChannel,
1182                                                      uint32_t Polarity)
1183 {
1184   UNUSED(DMAMUXx);
1185   MODIFY_REG(((DMAMUX_RequestGen_TypeDef *)((uint32_t)((uint32_t)DMAMUX1_RequestGenerator0 + (DMAMUX_RGCR_SIZE *
1186                                                        (RequestGenChannel)))))->RGCR, DMAMUX_RGxCR_GPOL, Polarity);
1187 }
1188 
1189 /**
1190   * @brief  Get the polarity of the signal on which the DMA request is generated.
1191   * @rmtoll RGxCR        GPOL          LL_DMAMUX_GetRequestGenPolarity
1192   * @param  DMAMUXx DMAMUXx Instance
1193   * @param  RequestGenChannel This parameter can be one of the following values:
1194   *         @arg @ref LL_DMAMUX_REQ_GEN_0
1195   *         @arg @ref LL_DMAMUX_REQ_GEN_1
1196   *         @arg @ref LL_DMAMUX_REQ_GEN_2
1197   *         @arg @ref LL_DMAMUX_REQ_GEN_3
1198   * @retval Returned value can be one of the following values:
1199   *         @arg @ref LL_DMAMUX_REQ_GEN_NO_EVENT
1200   *         @arg @ref LL_DMAMUX_REQ_GEN_POL_RISING
1201   *         @arg @ref LL_DMAMUX_REQ_GEN_POL_FALLING
1202   *         @arg @ref LL_DMAMUX_REQ_GEN_POL_RISING_FALLING
1203   */
LL_DMAMUX_GetRequestGenPolarity(DMAMUX_Channel_TypeDef * DMAMUXx,uint32_t RequestGenChannel)1204 __STATIC_INLINE uint32_t LL_DMAMUX_GetRequestGenPolarity(DMAMUX_Channel_TypeDef *DMAMUXx, uint32_t RequestGenChannel)
1205 {
1206   UNUSED(DMAMUXx);
1207   return (READ_BIT(((DMAMUX_RequestGen_TypeDef *)((uint32_t)((uint32_t)DMAMUX1_RequestGenerator0 + (DMAMUX_RGCR_SIZE *
1208                                                              (RequestGenChannel)))))->RGCR, DMAMUX_RGxCR_GPOL));
1209 }
1210 
1211 /**
1212   * @brief  Set the number of DMA request that will be autorized after a generation event.
1213   * @note   This field can only be written when Generator is disabled.
1214   * @rmtoll RGxCR        GNBREQ        LL_DMAMUX_SetGenRequestNb
1215   * @param  DMAMUXx DMAMUXx Instance
1216   * @param  RequestGenChannel This parameter can be one of the following values:
1217   *         @arg @ref LL_DMAMUX_REQ_GEN_0
1218   *         @arg @ref LL_DMAMUX_REQ_GEN_1
1219   *         @arg @ref LL_DMAMUX_REQ_GEN_2
1220   *         @arg @ref LL_DMAMUX_REQ_GEN_3
1221   * @param  RequestNb This parameter must be a value between Min_Data = 1 and Max_Data = 32.
1222   * @retval None
1223   */
LL_DMAMUX_SetGenRequestNb(DMAMUX_Channel_TypeDef * DMAMUXx,uint32_t RequestGenChannel,uint32_t RequestNb)1224 __STATIC_INLINE void LL_DMAMUX_SetGenRequestNb(DMAMUX_Channel_TypeDef *DMAMUXx, uint32_t RequestGenChannel,
1225                                                uint32_t RequestNb)
1226 {
1227   UNUSED(DMAMUXx);
1228   MODIFY_REG(((DMAMUX_RequestGen_TypeDef *)((uint32_t)((uint32_t)DMAMUX1_RequestGenerator0 + (DMAMUX_RGCR_SIZE *
1229                                                        (RequestGenChannel)))))->RGCR, DMAMUX_RGxCR_GNBREQ, (RequestNb - 1U) << DMAMUX_RGxCR_GNBREQ_Pos);
1230 }
1231 
1232 /**
1233   * @brief  Get the number of DMA request that will be autorized after a generation event.
1234   * @rmtoll RGxCR        GNBREQ        LL_DMAMUX_GetGenRequestNb
1235   * @param  DMAMUXx DMAMUXx Instance
1236   * @param  RequestGenChannel This parameter can be one of the following values:
1237   *         @arg @ref LL_DMAMUX_REQ_GEN_0
1238   *         @arg @ref LL_DMAMUX_REQ_GEN_1
1239   *         @arg @ref LL_DMAMUX_REQ_GEN_2
1240   *         @arg @ref LL_DMAMUX_REQ_GEN_3
1241   * @retval Between Min_Data = 1 and Max_Data = 32
1242   */
LL_DMAMUX_GetGenRequestNb(DMAMUX_Channel_TypeDef * DMAMUXx,uint32_t RequestGenChannel)1243 __STATIC_INLINE uint32_t LL_DMAMUX_GetGenRequestNb(DMAMUX_Channel_TypeDef *DMAMUXx, uint32_t RequestGenChannel)
1244 {
1245   UNUSED(DMAMUXx);
1246   return ((READ_BIT(((DMAMUX_RequestGen_TypeDef *)((uint32_t)((uint32_t)DMAMUX1_RequestGenerator0 + (DMAMUX_RGCR_SIZE *
1247                                                               (RequestGenChannel)))))->RGCR, DMAMUX_RGxCR_GNBREQ) >> DMAMUX_RGxCR_GNBREQ_Pos) + 1U);
1248 }
1249 
1250 /**
1251   * @brief  Set DMAMUX external Request Signal ID on DMAMUX Request Generation Trigger Event Channel x.
1252   * @rmtoll RGxCR        SIG_ID        LL_DMAMUX_SetRequestSignalID
1253   * @param  DMAMUXx DMAMUXx Instance
1254   * @param  RequestGenChannel This parameter can be one of the following values:
1255   *         @arg @ref LL_DMAMUX_REQ_GEN_0
1256   *         @arg @ref LL_DMAMUX_REQ_GEN_1
1257   *         @arg @ref LL_DMAMUX_REQ_GEN_2
1258   *         @arg @ref LL_DMAMUX_REQ_GEN_3
1259   * @param  RequestSignalID This parameter can be one of the following values:
1260   *         @arg @ref LL_DMAMUX_REQ_GEN_EXTI_LINE0
1261   *         @arg @ref LL_DMAMUX_REQ_GEN_EXTI_LINE1
1262   *         @arg @ref LL_DMAMUX_REQ_GEN_EXTI_LINE2
1263   *         @arg @ref LL_DMAMUX_REQ_GEN_EXTI_LINE3
1264   *         @arg @ref LL_DMAMUX_REQ_GEN_EXTI_LINE4
1265   *         @arg @ref LL_DMAMUX_REQ_GEN_EXTI_LINE5
1266   *         @arg @ref LL_DMAMUX_REQ_GEN_EXTI_LINE6
1267   *         @arg @ref LL_DMAMUX_REQ_GEN_EXTI_LINE7
1268   *         @arg @ref LL_DMAMUX_REQ_GEN_EXTI_LINE8
1269   *         @arg @ref LL_DMAMUX_REQ_GEN_EXTI_LINE9
1270   *         @arg @ref LL_DMAMUX_REQ_GEN_EXTI_LINE10
1271   *         @arg @ref LL_DMAMUX_REQ_GEN_EXTI_LINE11
1272   *         @arg @ref LL_DMAMUX_REQ_GEN_EXTI_LINE12
1273   *         @arg @ref LL_DMAMUX_REQ_GEN_EXTI_LINE13
1274   *         @arg @ref LL_DMAMUX_REQ_GEN_EXTI_LINE14
1275   *         @arg @ref LL_DMAMUX_REQ_GEN_EXTI_LINE15
1276   *         @arg @ref LL_DMAMUX_REQ_GEN_DMAMUX_CH0
1277   *         @arg @ref LL_DMAMUX_REQ_GEN_DMAMUX_CH1
1278   *         @arg @ref LL_DMAMUX_REQ_GEN_DMAMUX_CH2
1279   *         @arg @ref LL_DMAMUX_REQ_GEN_DMAMUX_CH3
1280   *         @arg @ref LL_DMAMUX_REQ_GEN_LPTIM1_OUT
1281   * @retval None
1282   */
LL_DMAMUX_SetRequestSignalID(DMAMUX_Channel_TypeDef * DMAMUXx,uint32_t RequestGenChannel,uint32_t RequestSignalID)1283 __STATIC_INLINE void LL_DMAMUX_SetRequestSignalID(DMAMUX_Channel_TypeDef *DMAMUXx, uint32_t RequestGenChannel,
1284                                                   uint32_t RequestSignalID)
1285 {
1286   UNUSED(DMAMUXx);
1287   MODIFY_REG(((DMAMUX_RequestGen_TypeDef *)((uint32_t)((uint32_t)DMAMUX1_RequestGenerator0 + (DMAMUX_RGCR_SIZE *
1288                                                        (RequestGenChannel)))))->RGCR, DMAMUX_RGxCR_SIG_ID, RequestSignalID);
1289 }
1290 
1291 /**
1292   * @brief  Get DMAMUX external Request Signal ID set on DMAMUX Channel x.
1293   * @rmtoll RGxCR        SIG_ID        LL_DMAMUX_GetRequestSignalID
1294   * @param  DMAMUXx DMAMUXx Instance
1295   * @param  RequestGenChannel This parameter can be one of the following values:
1296   *         @arg @ref LL_DMAMUX_REQ_GEN_0
1297   *         @arg @ref LL_DMAMUX_REQ_GEN_1
1298   *         @arg @ref LL_DMAMUX_REQ_GEN_2
1299   *         @arg @ref LL_DMAMUX_REQ_GEN_3
1300   * @retval Returned value can be one of the following values:
1301   *         @arg @ref LL_DMAMUX_REQ_GEN_EXTI_LINE0
1302   *         @arg @ref LL_DMAMUX_REQ_GEN_EXTI_LINE1
1303   *         @arg @ref LL_DMAMUX_REQ_GEN_EXTI_LINE2
1304   *         @arg @ref LL_DMAMUX_REQ_GEN_EXTI_LINE3
1305   *         @arg @ref LL_DMAMUX_REQ_GEN_EXTI_LINE4
1306   *         @arg @ref LL_DMAMUX_REQ_GEN_EXTI_LINE5
1307   *         @arg @ref LL_DMAMUX_REQ_GEN_EXTI_LINE6
1308   *         @arg @ref LL_DMAMUX_REQ_GEN_EXTI_LINE7
1309   *         @arg @ref LL_DMAMUX_REQ_GEN_EXTI_LINE8
1310   *         @arg @ref LL_DMAMUX_REQ_GEN_EXTI_LINE9
1311   *         @arg @ref LL_DMAMUX_REQ_GEN_EXTI_LINE10
1312   *         @arg @ref LL_DMAMUX_REQ_GEN_EXTI_LINE11
1313   *         @arg @ref LL_DMAMUX_REQ_GEN_EXTI_LINE12
1314   *         @arg @ref LL_DMAMUX_REQ_GEN_EXTI_LINE13
1315   *         @arg @ref LL_DMAMUX_REQ_GEN_EXTI_LINE14
1316   *         @arg @ref LL_DMAMUX_REQ_GEN_EXTI_LINE15
1317   *         @arg @ref LL_DMAMUX_REQ_GEN_DMAMUX_CH0
1318   *         @arg @ref LL_DMAMUX_REQ_GEN_DMAMUX_CH1
1319   *         @arg @ref LL_DMAMUX_REQ_GEN_DMAMUX_CH2
1320   *         @arg @ref LL_DMAMUX_REQ_GEN_DMAMUX_CH3
1321   *         @arg @ref LL_DMAMUX_REQ_GEN_LPTIM1_OUT
1322   */
LL_DMAMUX_GetRequestSignalID(DMAMUX_Channel_TypeDef * DMAMUXx,uint32_t RequestGenChannel)1323 __STATIC_INLINE uint32_t LL_DMAMUX_GetRequestSignalID(DMAMUX_Channel_TypeDef *DMAMUXx, uint32_t RequestGenChannel)
1324 {
1325   UNUSED(DMAMUXx);
1326   return (READ_BIT(((DMAMUX_RequestGen_TypeDef *)((uint32_t)((uint32_t)DMAMUX1_RequestGenerator0 + (DMAMUX_RGCR_SIZE *
1327                                                              (RequestGenChannel)))))->RGCR, DMAMUX_RGxCR_SIG_ID));
1328 }
1329 
1330 /**
1331   * @}
1332   */
1333 
1334 /** @defgroup DMAMUX_LL_EF_FLAG_Management FLAG_Management
1335   * @{
1336   */
1337 
1338 /**
1339   * @brief  Get Synchronization Event Overrun Flag Channel 0.
1340   * @rmtoll CSR          SOF0          LL_DMAMUX_IsActiveFlag_SO0
1341   * @param  DMAMUXx DMAMUXx DMAMUXx Instance
1342   * @retval State of bit (1 or 0).
1343   */
LL_DMAMUX_IsActiveFlag_SO0(DMAMUX_Channel_TypeDef * DMAMUXx)1344 __STATIC_INLINE uint32_t LL_DMAMUX_IsActiveFlag_SO0(DMAMUX_Channel_TypeDef *DMAMUXx)
1345 {
1346   UNUSED(DMAMUXx);
1347   return ((READ_BIT(DMAMUX1_ChannelStatus->CSR, DMAMUX_CSR_SOF0) == (DMAMUX_CSR_SOF0)) ? 1UL : 0UL);
1348 }
1349 
1350 /**
1351   * @brief  Get Synchronization Event Overrun Flag Channel 1.
1352   * @rmtoll CSR          SOF1          LL_DMAMUX_IsActiveFlag_SO1
1353   * @param  DMAMUXx DMAMUXx DMAMUXx Instance
1354   * @retval State of bit (1 or 0).
1355   */
LL_DMAMUX_IsActiveFlag_SO1(DMAMUX_Channel_TypeDef * DMAMUXx)1356 __STATIC_INLINE uint32_t LL_DMAMUX_IsActiveFlag_SO1(DMAMUX_Channel_TypeDef *DMAMUXx)
1357 {
1358   UNUSED(DMAMUXx);
1359   return ((READ_BIT(DMAMUX1_ChannelStatus->CSR, DMAMUX_CSR_SOF1) == (DMAMUX_CSR_SOF1)) ? 1UL : 0UL);
1360 }
1361 
1362 /**
1363   * @brief  Get Synchronization Event Overrun Flag Channel 2.
1364   * @rmtoll CSR          SOF2          LL_DMAMUX_IsActiveFlag_SO2
1365   * @param  DMAMUXx DMAMUXx DMAMUXx Instance
1366   * @retval State of bit (1 or 0).
1367   */
LL_DMAMUX_IsActiveFlag_SO2(DMAMUX_Channel_TypeDef * DMAMUXx)1368 __STATIC_INLINE uint32_t LL_DMAMUX_IsActiveFlag_SO2(DMAMUX_Channel_TypeDef *DMAMUXx)
1369 {
1370   UNUSED(DMAMUXx);
1371   return ((READ_BIT(DMAMUX1_ChannelStatus->CSR, DMAMUX_CSR_SOF2) == (DMAMUX_CSR_SOF2)) ? 1UL : 0UL);
1372 }
1373 
1374 /**
1375   * @brief  Get Synchronization Event Overrun Flag Channel 3.
1376   * @rmtoll CSR          SOF3          LL_DMAMUX_IsActiveFlag_SO3
1377   * @param  DMAMUXx DMAMUXx DMAMUXx Instance
1378   * @retval State of bit (1 or 0).
1379   */
LL_DMAMUX_IsActiveFlag_SO3(DMAMUX_Channel_TypeDef * DMAMUXx)1380 __STATIC_INLINE uint32_t LL_DMAMUX_IsActiveFlag_SO3(DMAMUX_Channel_TypeDef *DMAMUXx)
1381 {
1382   UNUSED(DMAMUXx);
1383   return ((READ_BIT(DMAMUX1_ChannelStatus->CSR, DMAMUX_CSR_SOF3) == (DMAMUX_CSR_SOF3)) ? 1UL : 0UL);
1384 }
1385 
1386 /**
1387   * @brief  Get Synchronization Event Overrun Flag Channel 4.
1388   * @rmtoll CSR          SOF4          LL_DMAMUX_IsActiveFlag_SO4
1389   * @param  DMAMUXx DMAMUXx DMAMUXx Instance
1390   * @retval State of bit (1 or 0).
1391   */
LL_DMAMUX_IsActiveFlag_SO4(DMAMUX_Channel_TypeDef * DMAMUXx)1392 __STATIC_INLINE uint32_t LL_DMAMUX_IsActiveFlag_SO4(DMAMUX_Channel_TypeDef *DMAMUXx)
1393 {
1394   UNUSED(DMAMUXx);
1395   return ((READ_BIT(DMAMUX1_ChannelStatus->CSR, DMAMUX_CSR_SOF4) == (DMAMUX_CSR_SOF4)) ? 1UL : 0UL);
1396 }
1397 
1398 /**
1399   * @brief  Get Synchronization Event Overrun Flag Channel 5.
1400   * @rmtoll CSR          SOF5          LL_DMAMUX_IsActiveFlag_SO5
1401   * @param  DMAMUXx DMAMUXx DMAMUXx Instance
1402   * @retval State of bit (1 or 0).
1403   */
LL_DMAMUX_IsActiveFlag_SO5(DMAMUX_Channel_TypeDef * DMAMUXx)1404 __STATIC_INLINE uint32_t LL_DMAMUX_IsActiveFlag_SO5(DMAMUX_Channel_TypeDef *DMAMUXx)
1405 {
1406   UNUSED(DMAMUXx);
1407   return ((READ_BIT(DMAMUX1_ChannelStatus->CSR, DMAMUX_CSR_SOF5) == (DMAMUX_CSR_SOF5)) ? 1UL : 0UL);
1408 }
1409 
1410 /**
1411   * @brief  Get Synchronization Event Overrun Flag Channel 6.
1412   * @rmtoll CSR          SOF6          LL_DMAMUX_IsActiveFlag_SO6
1413   * @param  DMAMUXx DMAMUXx DMAMUXx Instance
1414   * @retval State of bit (1 or 0).
1415   */
LL_DMAMUX_IsActiveFlag_SO6(DMAMUX_Channel_TypeDef * DMAMUXx)1416 __STATIC_INLINE uint32_t LL_DMAMUX_IsActiveFlag_SO6(DMAMUX_Channel_TypeDef *DMAMUXx)
1417 {
1418   UNUSED(DMAMUXx);
1419   return ((READ_BIT(DMAMUX1_ChannelStatus->CSR, DMAMUX_CSR_SOF6) == (DMAMUX_CSR_SOF6)) ? 1UL : 0UL);
1420 }
1421 
1422 /**
1423   * @brief  Get Synchronization Event Overrun Flag Channel 7.
1424   * @rmtoll CSR          SOF7          LL_DMAMUX_IsActiveFlag_SO7
1425   * @param  DMAMUXx DMAMUXx DMAMUXx Instance
1426   * @retval State of bit (1 or 0).
1427   */
LL_DMAMUX_IsActiveFlag_SO7(DMAMUX_Channel_TypeDef * DMAMUXx)1428 __STATIC_INLINE uint32_t LL_DMAMUX_IsActiveFlag_SO7(DMAMUX_Channel_TypeDef *DMAMUXx)
1429 {
1430   UNUSED(DMAMUXx);
1431   return ((READ_BIT(DMAMUX1_ChannelStatus->CSR, DMAMUX_CSR_SOF7) == (DMAMUX_CSR_SOF7)) ? 1UL : 0UL);
1432 }
1433 
1434 /**
1435   * @brief  Get Synchronization Event Overrun Flag Channel 8.
1436   * @rmtoll CSR          SOF8          LL_DMAMUX_IsActiveFlag_SO8
1437   * @param  DMAMUXx DMAMUXx DMAMUXx Instance
1438   * @retval State of bit (1 or 0).
1439   */
LL_DMAMUX_IsActiveFlag_SO8(DMAMUX_Channel_TypeDef * DMAMUXx)1440 __STATIC_INLINE uint32_t LL_DMAMUX_IsActiveFlag_SO8(DMAMUX_Channel_TypeDef *DMAMUXx)
1441 {
1442   UNUSED(DMAMUXx);
1443   return ((READ_BIT(DMAMUX1_ChannelStatus->CSR, DMAMUX_CSR_SOF8) == (DMAMUX_CSR_SOF8)) ? 1UL : 0UL);
1444 }
1445 
1446 /**
1447   * @brief  Get Synchronization Event Overrun Flag Channel 9.
1448   * @rmtoll CSR          SOF9          LL_DMAMUX_IsActiveFlag_SO9
1449   * @param  DMAMUXx DMAMUXx DMAMUXx Instance
1450   * @retval State of bit (1 or 0).
1451   */
LL_DMAMUX_IsActiveFlag_SO9(DMAMUX_Channel_TypeDef * DMAMUXx)1452 __STATIC_INLINE uint32_t LL_DMAMUX_IsActiveFlag_SO9(DMAMUX_Channel_TypeDef *DMAMUXx)
1453 {
1454   UNUSED(DMAMUXx);
1455   return ((READ_BIT(DMAMUX1_ChannelStatus->CSR, DMAMUX_CSR_SOF9) == (DMAMUX_CSR_SOF9)) ? 1UL : 0UL);
1456 }
1457 
1458 /**
1459   * @brief  Get Synchronization Event Overrun Flag Channel 10.
1460   * @rmtoll CSR          SOF10         LL_DMAMUX_IsActiveFlag_SO10
1461   * @param  DMAMUXx DMAMUXx DMAMUXx Instance
1462   * @retval State of bit (1 or 0).
1463   */
LL_DMAMUX_IsActiveFlag_SO10(DMAMUX_Channel_TypeDef * DMAMUXx)1464 __STATIC_INLINE uint32_t LL_DMAMUX_IsActiveFlag_SO10(DMAMUX_Channel_TypeDef *DMAMUXx)
1465 {
1466   UNUSED(DMAMUXx);
1467   return ((READ_BIT(DMAMUX1_ChannelStatus->CSR, DMAMUX_CSR_SOF10) == (DMAMUX_CSR_SOF10)) ? 1UL : 0UL);
1468 }
1469 
1470 /**
1471   * @brief  Get Synchronization Event Overrun Flag Channel 11.
1472   * @rmtoll CSR          SOF11         LL_DMAMUX_IsActiveFlag_SO11
1473   * @param  DMAMUXx DMAMUXx DMAMUXx Instance
1474   * @retval State of bit (1 or 0).
1475   */
LL_DMAMUX_IsActiveFlag_SO11(DMAMUX_Channel_TypeDef * DMAMUXx)1476 __STATIC_INLINE uint32_t LL_DMAMUX_IsActiveFlag_SO11(DMAMUX_Channel_TypeDef *DMAMUXx)
1477 {
1478   UNUSED(DMAMUXx);
1479   return ((READ_BIT(DMAMUX1_ChannelStatus->CSR, DMAMUX_CSR_SOF11) == (DMAMUX_CSR_SOF11)) ? 1UL : 0UL);
1480 }
1481 
1482 #if defined (DMAMUX_CSR_SOF12)
1483 /**
1484   * @brief  Get Synchronization Event Overrun Flag Channel 12.
1485   * @rmtoll CSR          SOF12         LL_DMAMUX_IsActiveFlag_SO12
1486   * @param  DMAMUXx DMAMUXx DMAMUXx Instance
1487   * @retval State of bit (1 or 0).
1488   */
LL_DMAMUX_IsActiveFlag_SO12(DMAMUX_Channel_TypeDef * DMAMUXx)1489 __STATIC_INLINE uint32_t LL_DMAMUX_IsActiveFlag_SO12(DMAMUX_Channel_TypeDef *DMAMUXx)
1490 {
1491   UNUSED(DMAMUXx);
1492   return ((READ_BIT(DMAMUX1_ChannelStatus->CSR, DMAMUX_CSR_SOF12) == (DMAMUX_CSR_SOF12)) ? 1UL : 0UL);
1493 }
1494 #endif /* DMAMUX_CSR_SOF12 */
1495 
1496 #if defined (DMAMUX_CSR_SOF13)
1497 /**
1498   * @brief  Get Synchronization Event Overrun Flag Channel 13.
1499   * @rmtoll CSR          SOF13         LL_DMAMUX_IsActiveFlag_SO13
1500   * @param  DMAMUXx DMAMUXx DMAMUXx Instance
1501   * @retval State of bit (1 or 0).
1502   */
LL_DMAMUX_IsActiveFlag_SO13(DMAMUX_Channel_TypeDef * DMAMUXx)1503 __STATIC_INLINE uint32_t LL_DMAMUX_IsActiveFlag_SO13(DMAMUX_Channel_TypeDef *DMAMUXx)
1504 {
1505   UNUSED(DMAMUXx);
1506   return ((READ_BIT(DMAMUX1_ChannelStatus->CSR, DMAMUX_CSR_SOF13) == (DMAMUX_CSR_SOF13)) ? 1UL : 0UL);
1507 }
1508 #endif /* DMAMUX_CSR_SOF13 */
1509 
1510 #if defined (DMAMUX_CSR_SOF14)
1511 /**
1512   * @brief  Get Synchronization Event Overrun Flag Channel 14.
1513   * @rmtoll CSR          SOF13         LL_DMAMUX_IsActiveFlag_SO14
1514   * @param  DMAMUXx DMAMUXx DMAMUXx Instance
1515   * @retval State of bit (1 or 0).
1516   */
LL_DMAMUX_IsActiveFlag_SO14(DMAMUX_Channel_TypeDef * DMAMUXx)1517 __STATIC_INLINE uint32_t LL_DMAMUX_IsActiveFlag_SO14(DMAMUX_Channel_TypeDef *DMAMUXx)
1518 {
1519   UNUSED(DMAMUXx);
1520   return ((READ_BIT(DMAMUX1_ChannelStatus->CSR, DMAMUX_CSR_SOF14) == (DMAMUX_CSR_SOF14)) ? 1UL : 0UL);
1521 }
1522 #endif /* DMAMUX_CSR_SOF14 */
1523 
1524 #if defined (DMAMUX_CSR_SOF15)
1525 /**
1526   * @brief  Get Synchronization Event Overrun Flag Channel 15.
1527   * @rmtoll CSR          SOF13         LL_DMAMUX_IsActiveFlag_SO15
1528   * @param  DMAMUXx DMAMUXx DMAMUXx Instance
1529   * @retval State of bit (1 or 0).
1530   */
LL_DMAMUX_IsActiveFlag_SO15(DMAMUX_Channel_TypeDef * DMAMUXx)1531 __STATIC_INLINE uint32_t LL_DMAMUX_IsActiveFlag_SO15(DMAMUX_Channel_TypeDef *DMAMUXx)
1532 {
1533   UNUSED(DMAMUXx);
1534   return ((READ_BIT(DMAMUX1_ChannelStatus->CSR, DMAMUX_CSR_SOF15) == (DMAMUX_CSR_SOF15)) ? 1UL : 0UL);
1535 }
1536 #endif /* DMAMUX_CSR_SOF15 */
1537 
1538 /**
1539   * @brief  Get Request Generator 0 Trigger Event Overrun Flag.
1540   * @rmtoll RGSR         OF0           LL_DMAMUX_IsActiveFlag_RGO0
1541   * @param  DMAMUXx DMAMUXx DMAMUXx Instance
1542   * @retval State of bit (1 or 0).
1543   */
LL_DMAMUX_IsActiveFlag_RGO0(DMAMUX_Channel_TypeDef * DMAMUXx)1544 __STATIC_INLINE uint32_t LL_DMAMUX_IsActiveFlag_RGO0(DMAMUX_Channel_TypeDef *DMAMUXx)
1545 {
1546   UNUSED(DMAMUXx);
1547   return ((READ_BIT(DMAMUX1_RequestGenStatus->RGSR, DMAMUX_RGSR_OF0) == (DMAMUX_RGSR_OF0)) ? 1UL : 0UL);
1548 }
1549 
1550 /**
1551   * @brief  Get Request Generator 1 Trigger Event Overrun Flag.
1552   * @rmtoll RGSR         OF1           LL_DMAMUX_IsActiveFlag_RGO1
1553   * @param  DMAMUXx DMAMUXx DMAMUXx Instance
1554   * @retval State of bit (1 or 0).
1555   */
LL_DMAMUX_IsActiveFlag_RGO1(DMAMUX_Channel_TypeDef * DMAMUXx)1556 __STATIC_INLINE uint32_t LL_DMAMUX_IsActiveFlag_RGO1(DMAMUX_Channel_TypeDef *DMAMUXx)
1557 {
1558   UNUSED(DMAMUXx);
1559   return ((READ_BIT(DMAMUX1_RequestGenStatus->RGSR, DMAMUX_RGSR_OF1) == (DMAMUX_RGSR_OF1)) ? 1UL : 0UL);
1560 }
1561 
1562 /**
1563   * @brief  Get Request Generator 2 Trigger Event Overrun Flag.
1564   * @rmtoll RGSR         OF2           LL_DMAMUX_IsActiveFlag_RGO2
1565   * @param  DMAMUXx DMAMUXx DMAMUXx Instance
1566   * @retval State of bit (1 or 0).
1567   */
LL_DMAMUX_IsActiveFlag_RGO2(DMAMUX_Channel_TypeDef * DMAMUXx)1568 __STATIC_INLINE uint32_t LL_DMAMUX_IsActiveFlag_RGO2(DMAMUX_Channel_TypeDef *DMAMUXx)
1569 {
1570   UNUSED(DMAMUXx);
1571   return ((READ_BIT(DMAMUX1_RequestGenStatus->RGSR, DMAMUX_RGSR_OF2) == (DMAMUX_RGSR_OF2)) ? 1UL : 0UL);
1572 }
1573 
1574 /**
1575   * @brief  Get Request Generator 3 Trigger Event Overrun Flag.
1576   * @rmtoll RGSR         OF3           LL_DMAMUX_IsActiveFlag_RGO3
1577   * @param  DMAMUXx DMAMUXx DMAMUXx Instance
1578   * @retval State of bit (1 or 0).
1579   */
LL_DMAMUX_IsActiveFlag_RGO3(DMAMUX_Channel_TypeDef * DMAMUXx)1580 __STATIC_INLINE uint32_t LL_DMAMUX_IsActiveFlag_RGO3(DMAMUX_Channel_TypeDef *DMAMUXx)
1581 {
1582   UNUSED(DMAMUXx);
1583   return ((READ_BIT(DMAMUX1_RequestGenStatus->RGSR, DMAMUX_RGSR_OF3) == (DMAMUX_RGSR_OF3)) ? 1UL : 0UL);
1584 }
1585 
1586 /**
1587   * @brief  Clear Synchronization Event Overrun Flag Channel 0.
1588   * @rmtoll CFR          CSOF0         LL_DMAMUX_ClearFlag_SO0
1589   * @param  DMAMUXx DMAMUXx DMAMUXx Instance
1590   * @retval None
1591   */
LL_DMAMUX_ClearFlag_SO0(DMAMUX_Channel_TypeDef * DMAMUXx)1592 __STATIC_INLINE void LL_DMAMUX_ClearFlag_SO0(DMAMUX_Channel_TypeDef *DMAMUXx)
1593 {
1594   UNUSED(DMAMUXx);
1595   SET_BIT(DMAMUX1_ChannelStatus->CFR, DMAMUX_CFR_CSOF0);
1596 }
1597 
1598 /**
1599   * @brief  Clear Synchronization Event Overrun Flag Channel 1.
1600   * @rmtoll CFR          CSOF1         LL_DMAMUX_ClearFlag_SO1
1601   * @param  DMAMUXx DMAMUXx DMAMUXx Instance
1602   * @retval None
1603   */
LL_DMAMUX_ClearFlag_SO1(DMAMUX_Channel_TypeDef * DMAMUXx)1604 __STATIC_INLINE void LL_DMAMUX_ClearFlag_SO1(DMAMUX_Channel_TypeDef *DMAMUXx)
1605 {
1606   UNUSED(DMAMUXx);
1607   SET_BIT(DMAMUX1_ChannelStatus->CFR, DMAMUX_CFR_CSOF1);
1608 }
1609 
1610 /**
1611   * @brief  Clear Synchronization Event Overrun Flag Channel 2.
1612   * @rmtoll CFR          CSOF2         LL_DMAMUX_ClearFlag_SO2
1613   * @param  DMAMUXx DMAMUXx DMAMUXx Instance
1614   * @retval None
1615   */
LL_DMAMUX_ClearFlag_SO2(DMAMUX_Channel_TypeDef * DMAMUXx)1616 __STATIC_INLINE void LL_DMAMUX_ClearFlag_SO2(DMAMUX_Channel_TypeDef *DMAMUXx)
1617 {
1618   UNUSED(DMAMUXx);
1619   SET_BIT(DMAMUX1_ChannelStatus->CFR, DMAMUX_CFR_CSOF2);
1620 }
1621 
1622 /**
1623   * @brief  Clear Synchronization Event Overrun Flag Channel 3.
1624   * @rmtoll CFR          CSOF3         LL_DMAMUX_ClearFlag_SO3
1625   * @param  DMAMUXx DMAMUXx DMAMUXx Instance
1626   * @retval None
1627   */
LL_DMAMUX_ClearFlag_SO3(DMAMUX_Channel_TypeDef * DMAMUXx)1628 __STATIC_INLINE void LL_DMAMUX_ClearFlag_SO3(DMAMUX_Channel_TypeDef *DMAMUXx)
1629 {
1630   UNUSED(DMAMUXx);
1631   SET_BIT(DMAMUX1_ChannelStatus->CFR, DMAMUX_CFR_CSOF3);
1632 }
1633 
1634 /**
1635   * @brief  Clear Synchronization Event Overrun Flag Channel 4.
1636   * @rmtoll CFR          CSOF4         LL_DMAMUX_ClearFlag_SO4
1637   * @param  DMAMUXx DMAMUXx DMAMUXx Instance
1638   * @retval None
1639   */
LL_DMAMUX_ClearFlag_SO4(DMAMUX_Channel_TypeDef * DMAMUXx)1640 __STATIC_INLINE void LL_DMAMUX_ClearFlag_SO4(DMAMUX_Channel_TypeDef *DMAMUXx)
1641 {
1642   UNUSED(DMAMUXx);
1643   SET_BIT(DMAMUX1_ChannelStatus->CFR, DMAMUX_CFR_CSOF4);
1644 }
1645 
1646 /**
1647   * @brief  Clear Synchronization Event Overrun Flag Channel 5.
1648   * @rmtoll CFR          CSOF5         LL_DMAMUX_ClearFlag_SO5
1649   * @param  DMAMUXx DMAMUXx DMAMUXx Instance
1650   * @retval None
1651   */
LL_DMAMUX_ClearFlag_SO5(DMAMUX_Channel_TypeDef * DMAMUXx)1652 __STATIC_INLINE void LL_DMAMUX_ClearFlag_SO5(DMAMUX_Channel_TypeDef *DMAMUXx)
1653 {
1654   UNUSED(DMAMUXx);
1655   SET_BIT(DMAMUX1_ChannelStatus->CFR, DMAMUX_CFR_CSOF5);
1656 }
1657 
1658 /**
1659   * @brief  Clear Synchronization Event Overrun Flag Channel 6.
1660   * @rmtoll CFR          CSOF6         LL_DMAMUX_ClearFlag_SO6
1661   * @param  DMAMUXx DMAMUXx DMAMUXx Instance
1662   * @retval None
1663   */
LL_DMAMUX_ClearFlag_SO6(DMAMUX_Channel_TypeDef * DMAMUXx)1664 __STATIC_INLINE void LL_DMAMUX_ClearFlag_SO6(DMAMUX_Channel_TypeDef *DMAMUXx)
1665 {
1666   UNUSED(DMAMUXx);
1667   SET_BIT(DMAMUX1_ChannelStatus->CFR, DMAMUX_CFR_CSOF6);
1668 }
1669 
1670 /**
1671   * @brief  Clear Synchronization Event Overrun Flag Channel 7.
1672   * @rmtoll CFR          CSOF7         LL_DMAMUX_ClearFlag_SO7
1673   * @param  DMAMUXx DMAMUXx DMAMUXx Instance
1674   * @retval None
1675   */
LL_DMAMUX_ClearFlag_SO7(DMAMUX_Channel_TypeDef * DMAMUXx)1676 __STATIC_INLINE void LL_DMAMUX_ClearFlag_SO7(DMAMUX_Channel_TypeDef *DMAMUXx)
1677 {
1678   UNUSED(DMAMUXx);
1679   SET_BIT(DMAMUX1_ChannelStatus->CFR, DMAMUX_CFR_CSOF7);
1680 }
1681 
1682 /**
1683   * @brief  Clear Synchronization Event Overrun Flag Channel 8.
1684   * @rmtoll CFR          CSOF8         LL_DMAMUX_ClearFlag_SO8
1685   * @param  DMAMUXx DMAMUXx DMAMUXx Instance
1686   * @retval None
1687   */
LL_DMAMUX_ClearFlag_SO8(DMAMUX_Channel_TypeDef * DMAMUXx)1688 __STATIC_INLINE void LL_DMAMUX_ClearFlag_SO8(DMAMUX_Channel_TypeDef *DMAMUXx)
1689 {
1690   UNUSED(DMAMUXx);
1691   SET_BIT(DMAMUX1_ChannelStatus->CFR, DMAMUX_CFR_CSOF8);
1692 }
1693 
1694 /**
1695   * @brief  Clear Synchronization Event Overrun Flag Channel 9.
1696   * @rmtoll CFR          CSOF9         LL_DMAMUX_ClearFlag_SO9
1697   * @param  DMAMUXx DMAMUXx DMAMUXx Instance
1698   * @retval None
1699   */
LL_DMAMUX_ClearFlag_SO9(DMAMUX_Channel_TypeDef * DMAMUXx)1700 __STATIC_INLINE void LL_DMAMUX_ClearFlag_SO9(DMAMUX_Channel_TypeDef *DMAMUXx)
1701 {
1702   UNUSED(DMAMUXx);
1703   SET_BIT(DMAMUX1_ChannelStatus->CFR, DMAMUX_CFR_CSOF9);
1704 }
1705 
1706 /**
1707   * @brief  Clear Synchronization Event Overrun Flag Channel 10.
1708   * @rmtoll CFR          CSOF10        LL_DMAMUX_ClearFlag_SO10
1709   * @param  DMAMUXx DMAMUXx DMAMUXx Instance
1710   * @retval None
1711   */
LL_DMAMUX_ClearFlag_SO10(DMAMUX_Channel_TypeDef * DMAMUXx)1712 __STATIC_INLINE void LL_DMAMUX_ClearFlag_SO10(DMAMUX_Channel_TypeDef *DMAMUXx)
1713 {
1714   UNUSED(DMAMUXx);
1715   SET_BIT(DMAMUX1_ChannelStatus->CFR, DMAMUX_CFR_CSOF10);
1716 }
1717 
1718 /**
1719   * @brief  Clear Synchronization Event Overrun Flag Channel 11.
1720   * @rmtoll CFR          CSOF11        LL_DMAMUX_ClearFlag_SO11
1721   * @param  DMAMUXx DMAMUXx DMAMUXx Instance
1722   * @retval None
1723   */
LL_DMAMUX_ClearFlag_SO11(DMAMUX_Channel_TypeDef * DMAMUXx)1724 __STATIC_INLINE void LL_DMAMUX_ClearFlag_SO11(DMAMUX_Channel_TypeDef *DMAMUXx)
1725 {
1726   UNUSED(DMAMUXx);
1727   SET_BIT(DMAMUX1_ChannelStatus->CFR, DMAMUX_CFR_CSOF11);
1728 }
1729 
1730 #if defined (DMAMUX_CFR_CSOF12)
1731 /**
1732   * @brief  Clear Synchronization Event Overrun Flag Channel 12.
1733   * @rmtoll CFR          CSOF12        LL_DMAMUX_ClearFlag_SO12
1734   * @param  DMAMUXx DMAMUXx DMAMUXx Instance
1735   * @retval None
1736   */
LL_DMAMUX_ClearFlag_SO12(DMAMUX_Channel_TypeDef * DMAMUXx)1737 __STATIC_INLINE void LL_DMAMUX_ClearFlag_SO12(DMAMUX_Channel_TypeDef *DMAMUXx)
1738 {
1739   UNUSED(DMAMUXx);
1740   SET_BIT(DMAMUX1_ChannelStatus->CFR, DMAMUX_CFR_CSOF12);
1741 }
1742 #endif /* DMAMUX_CFR_CSOF12 */
1743 
1744 #if defined (DMAMUX_CFR_CSOF13)
1745 /**
1746   * @brief  Clear Synchronization Event Overrun Flag Channel 13.
1747   * @rmtoll CFR          CSOF13        LL_DMAMUX_ClearFlag_SO13
1748   * @param  DMAMUXx DMAMUXx DMAMUXx Instance
1749   * @retval None
1750   */
LL_DMAMUX_ClearFlag_SO13(DMAMUX_Channel_TypeDef * DMAMUXx)1751 __STATIC_INLINE void LL_DMAMUX_ClearFlag_SO13(DMAMUX_Channel_TypeDef *DMAMUXx)
1752 {
1753   UNUSED(DMAMUXx);
1754   SET_BIT(DMAMUX1_ChannelStatus->CFR, DMAMUX_CFR_CSOF13);
1755 }
1756 #endif /* DMAMUX_CFR_CSOF13 */
1757 
1758 #if defined (DMAMUX_CFR_CSOF14)
1759 /**
1760   * @brief  Clear Synchronization Event Overrun Flag Channel 14.
1761   * @rmtoll CFR          CSOF14        LL_DMAMUX_ClearFlag_SO14
1762   * @param  DMAMUXx DMAMUXx DMAMUXx Instance
1763   * @retval None
1764   */
LL_DMAMUX_ClearFlag_SO14(DMAMUX_Channel_TypeDef * DMAMUXx)1765 __STATIC_INLINE void LL_DMAMUX_ClearFlag_SO14(DMAMUX_Channel_TypeDef *DMAMUXx)
1766 {
1767   UNUSED(DMAMUXx);
1768   SET_BIT(DMAMUX1_ChannelStatus->CFR, DMAMUX_CFR_CSOF14);
1769 }
1770 #endif /* DMAMUX_CFR_CSOF14 */
1771 
1772 #if defined (DMAMUX_CFR_CSOF15)
1773 /**
1774   * @brief  Clear Synchronization Event Overrun Flag Channel 15.
1775   * @rmtoll CFR          CSOF15        LL_DMAMUX_ClearFlag_SO15
1776   * @param  DMAMUXx DMAMUXx DMAMUXx Instance
1777   * @retval None
1778   */
LL_DMAMUX_ClearFlag_SO15(DMAMUX_Channel_TypeDef * DMAMUXx)1779 __STATIC_INLINE void LL_DMAMUX_ClearFlag_SO15(DMAMUX_Channel_TypeDef *DMAMUXx)
1780 {
1781   UNUSED(DMAMUXx);
1782   SET_BIT(DMAMUX1_ChannelStatus->CFR, DMAMUX_CFR_CSOF15);
1783 }
1784 #endif /* DMAMUX_CFR_CSOF15 */
1785 
1786 /**
1787   * @brief  Clear Request Generator 0 Trigger Event Overrun Flag.
1788   * @rmtoll RGCFR        COF0          LL_DMAMUX_ClearFlag_RGO0
1789   * @param  DMAMUXx DMAMUXx DMAMUXx Instance
1790   * @retval None
1791   */
LL_DMAMUX_ClearFlag_RGO0(DMAMUX_Channel_TypeDef * DMAMUXx)1792 __STATIC_INLINE void LL_DMAMUX_ClearFlag_RGO0(DMAMUX_Channel_TypeDef *DMAMUXx)
1793 {
1794   UNUSED(DMAMUXx);
1795   SET_BIT(DMAMUX1_RequestGenStatus->RGCFR, DMAMUX_RGCFR_COF0);
1796 }
1797 
1798 /**
1799   * @brief  Clear Request Generator 1 Trigger Event Overrun Flag.
1800   * @rmtoll RGCFR        COF1          LL_DMAMUX_ClearFlag_RGO1
1801   * @param  DMAMUXx DMAMUXx DMAMUXx Instance
1802   * @retval None
1803   */
LL_DMAMUX_ClearFlag_RGO1(DMAMUX_Channel_TypeDef * DMAMUXx)1804 __STATIC_INLINE void LL_DMAMUX_ClearFlag_RGO1(DMAMUX_Channel_TypeDef *DMAMUXx)
1805 {
1806   UNUSED(DMAMUXx);
1807   SET_BIT(DMAMUX1_RequestGenStatus->RGCFR, DMAMUX_RGCFR_COF1);
1808 }
1809 
1810 /**
1811   * @brief  Clear Request Generator 2 Trigger Event Overrun Flag.
1812   * @rmtoll RGCFR        COF2          LL_DMAMUX_ClearFlag_RGO2
1813   * @param  DMAMUXx DMAMUXx DMAMUXx Instance
1814   * @retval None
1815   */
LL_DMAMUX_ClearFlag_RGO2(DMAMUX_Channel_TypeDef * DMAMUXx)1816 __STATIC_INLINE void LL_DMAMUX_ClearFlag_RGO2(DMAMUX_Channel_TypeDef *DMAMUXx)
1817 {
1818   UNUSED(DMAMUXx);
1819   SET_BIT(DMAMUX1_RequestGenStatus->RGCFR, DMAMUX_RGCFR_COF2);
1820 }
1821 
1822 /**
1823   * @brief  Clear Request Generator 3 Trigger Event Overrun Flag.
1824   * @rmtoll RGCFR        COF3          LL_DMAMUX_ClearFlag_RGO3
1825   * @param  DMAMUXx DMAMUXx DMAMUXx Instance
1826   * @retval None
1827   */
LL_DMAMUX_ClearFlag_RGO3(DMAMUX_Channel_TypeDef * DMAMUXx)1828 __STATIC_INLINE void LL_DMAMUX_ClearFlag_RGO3(DMAMUX_Channel_TypeDef *DMAMUXx)
1829 {
1830   UNUSED(DMAMUXx);
1831   SET_BIT(DMAMUX1_RequestGenStatus->RGCFR, DMAMUX_RGCFR_COF3);
1832 }
1833 
1834 /**
1835   * @}
1836   */
1837 
1838 /** @defgroup DMAMUX_LL_EF_IT_Management IT_Management
1839   * @{
1840   */
1841 
1842 /**
1843   * @brief  Enable the Synchronization Event Overrun Interrupt on DMAMUX channel x.
1844   * @rmtoll CxCR         SOIE          LL_DMAMUX_EnableIT_SO
1845   * @param  DMAMUXx DMAMUXx Instance
1846   * @param  Channel This parameter can be one of the following values:
1847   *         @arg @ref LL_DMAMUX_CHANNEL_0
1848   *         @arg @ref LL_DMAMUX_CHANNEL_1
1849   *         @arg @ref LL_DMAMUX_CHANNEL_2
1850   *         @arg @ref LL_DMAMUX_CHANNEL_3
1851   *         @arg @ref LL_DMAMUX_CHANNEL_4
1852   *         @arg @ref LL_DMAMUX_CHANNEL_5
1853   *         @arg @ref LL_DMAMUX_CHANNEL_6
1854   *         @arg @ref LL_DMAMUX_CHANNEL_7
1855   *         @arg @ref LL_DMAMUX_CHANNEL_8
1856   *         @arg @ref LL_DMAMUX_CHANNEL_9
1857   *         @arg @ref LL_DMAMUX_CHANNEL_10
1858   *         @arg @ref LL_DMAMUX_CHANNEL_11
1859   *         @arg @ref LL_DMAMUX_CHANNEL_12
1860   *         @arg @ref LL_DMAMUX_CHANNEL_13
1861   *         @arg @ref LL_DMAMUX_CHANNEL_14
1862   *         @arg @ref LL_DMAMUX_CHANNEL_15
1863   * @retval None
1864   */
LL_DMAMUX_EnableIT_SO(DMAMUX_Channel_TypeDef * DMAMUXx,uint32_t Channel)1865 __STATIC_INLINE void LL_DMAMUX_EnableIT_SO(DMAMUX_Channel_TypeDef *DMAMUXx, uint32_t Channel)
1866 {
1867   (void)(DMAMUXx);
1868   SET_BIT((DMAMUX1_Channel0 + Channel)->CCR, DMAMUX_CxCR_SOIE);
1869 }
1870 
1871 /**
1872   * @brief  Disable the Synchronization Event Overrun Interrupt on DMAMUX channel x.
1873   * @rmtoll CxCR         SOIE          LL_DMAMUX_DisableIT_SO
1874   * @param  DMAMUXx DMAMUXx Instance
1875   * @param  Channel This parameter can be one of the following values:
1876   *         @arg @ref LL_DMAMUX_CHANNEL_0
1877   *         @arg @ref LL_DMAMUX_CHANNEL_1
1878   *         @arg @ref LL_DMAMUX_CHANNEL_2
1879   *         @arg @ref LL_DMAMUX_CHANNEL_3
1880   *         @arg @ref LL_DMAMUX_CHANNEL_4
1881   *         @arg @ref LL_DMAMUX_CHANNEL_5
1882   *         @arg @ref LL_DMAMUX_CHANNEL_6
1883   *         @arg @ref LL_DMAMUX_CHANNEL_7
1884   *         @arg @ref LL_DMAMUX_CHANNEL_8
1885   *         @arg @ref LL_DMAMUX_CHANNEL_9
1886   *         @arg @ref LL_DMAMUX_CHANNEL_10
1887   *         @arg @ref LL_DMAMUX_CHANNEL_11
1888   *         @arg @ref LL_DMAMUX_CHANNEL_12
1889   *         @arg @ref LL_DMAMUX_CHANNEL_13
1890   *         @arg @ref LL_DMAMUX_CHANNEL_14
1891   *         @arg @ref LL_DMAMUX_CHANNEL_15
1892   * @retval None
1893   */
LL_DMAMUX_DisableIT_SO(DMAMUX_Channel_TypeDef * DMAMUXx,uint32_t Channel)1894 __STATIC_INLINE void LL_DMAMUX_DisableIT_SO(DMAMUX_Channel_TypeDef *DMAMUXx, uint32_t Channel)
1895 {
1896   (void)(DMAMUXx);
1897   CLEAR_BIT((DMAMUX1_Channel0 + Channel)->CCR, DMAMUX_CxCR_SOIE);
1898 }
1899 
1900 /**
1901   * @brief  Check if the Synchronization Event Overrun Interrupt on DMAMUX channel x is enabled or disabled.
1902   * @rmtoll CxCR         SOIE          LL_DMAMUX_IsEnabledIT_SO
1903   * @param  DMAMUXx DMAMUXx Instance
1904   * @param  Channel This parameter can be one of the following values:
1905   *         @arg @ref LL_DMAMUX_CHANNEL_0
1906   *         @arg @ref LL_DMAMUX_CHANNEL_1
1907   *         @arg @ref LL_DMAMUX_CHANNEL_2
1908   *         @arg @ref LL_DMAMUX_CHANNEL_3
1909   *         @arg @ref LL_DMAMUX_CHANNEL_4
1910   *         @arg @ref LL_DMAMUX_CHANNEL_5
1911   *         @arg @ref LL_DMAMUX_CHANNEL_6
1912   *         @arg @ref LL_DMAMUX_CHANNEL_7
1913   *         @arg @ref LL_DMAMUX_CHANNEL_8
1914   *         @arg @ref LL_DMAMUX_CHANNEL_9
1915   *         @arg @ref LL_DMAMUX_CHANNEL_10
1916   *         @arg @ref LL_DMAMUX_CHANNEL_11
1917   *         @arg @ref LL_DMAMUX_CHANNEL_12
1918   *         @arg @ref LL_DMAMUX_CHANNEL_13
1919   *         @arg @ref LL_DMAMUX_CHANNEL_14
1920   *         @arg @ref LL_DMAMUX_CHANNEL_15
1921   * @retval State of bit (1 or 0).
1922   */
LL_DMAMUX_IsEnabledIT_SO(DMAMUX_Channel_TypeDef * DMAMUXx,uint32_t Channel)1923 __STATIC_INLINE uint32_t LL_DMAMUX_IsEnabledIT_SO(DMAMUX_Channel_TypeDef *DMAMUXx, uint32_t Channel)
1924 {
1925   (void)(DMAMUXx);
1926   return (((READ_BIT((DMAMUX1_Channel0 + Channel)->CCR, DMAMUX_CxCR_SOIE)) == (DMAMUX_CxCR_SOIE))? 1UL : 0UL);
1927 }
1928 
1929 /**
1930   * @brief  Enable the Request Generation Trigger Event Overrun Interrupt on DMAMUX channel x.
1931   * @rmtoll RGxCR        OIE           LL_DMAMUX_EnableIT_RGO
1932   * @param  DMAMUXx DMAMUXx Instance
1933   * @param  RequestGenChannel This parameter can be one of the following values:
1934   *         @arg @ref LL_DMAMUX_REQ_GEN_0
1935   *         @arg @ref LL_DMAMUX_REQ_GEN_1
1936   *         @arg @ref LL_DMAMUX_REQ_GEN_2
1937   *         @arg @ref LL_DMAMUX_REQ_GEN_3
1938   * @retval None
1939   */
LL_DMAMUX_EnableIT_RGO(DMAMUX_Channel_TypeDef * DMAMUXx,uint32_t RequestGenChannel)1940 __STATIC_INLINE void LL_DMAMUX_EnableIT_RGO(DMAMUX_Channel_TypeDef *DMAMUXx, uint32_t RequestGenChannel)
1941 {
1942   UNUSED(DMAMUXx);
1943   SET_BIT(((DMAMUX_RequestGen_TypeDef *)((uint32_t)((uint32_t)DMAMUX1_RequestGenerator0 + (DMAMUX_RGCR_SIZE *
1944                                                     (RequestGenChannel)))))->RGCR, DMAMUX_RGxCR_OIE);
1945 }
1946 
1947 /**
1948   * @brief  Disable the Request Generation Trigger Event Overrun Interrupt on DMAMUX channel x.
1949   * @rmtoll RGxCR        OIE           LL_DMAMUX_DisableIT_RGO
1950   * @param  DMAMUXx DMAMUXx Instance
1951   * @param  RequestGenChannel This parameter can be one of the following values:
1952   *         @arg @ref LL_DMAMUX_REQ_GEN_0
1953   *         @arg @ref LL_DMAMUX_REQ_GEN_1
1954   *         @arg @ref LL_DMAMUX_REQ_GEN_2
1955   *         @arg @ref LL_DMAMUX_REQ_GEN_3
1956   * @retval None
1957   */
LL_DMAMUX_DisableIT_RGO(DMAMUX_Channel_TypeDef * DMAMUXx,uint32_t RequestGenChannel)1958 __STATIC_INLINE void LL_DMAMUX_DisableIT_RGO(DMAMUX_Channel_TypeDef *DMAMUXx, uint32_t RequestGenChannel)
1959 {
1960   UNUSED(DMAMUXx);
1961   CLEAR_BIT(((DMAMUX_RequestGen_TypeDef *)((uint32_t)((uint32_t)DMAMUX1_RequestGenerator0 + (DMAMUX_RGCR_SIZE *
1962                                                       (RequestGenChannel)))))->RGCR, DMAMUX_RGxCR_OIE);
1963 }
1964 
1965 /**
1966   * @brief  Check if the Request Generation Trigger Event Overrun Interrupt on DMAMUX channel x is enabled or disabled.
1967   * @rmtoll RGxCR        OIE           LL_DMAMUX_IsEnabledIT_RGO
1968   * @param  DMAMUXx DMAMUXx Instance
1969   * @param  RequestGenChannel This parameter can be one of the following values:
1970   *         @arg @ref LL_DMAMUX_REQ_GEN_0
1971   *         @arg @ref LL_DMAMUX_REQ_GEN_1
1972   *         @arg @ref LL_DMAMUX_REQ_GEN_2
1973   *         @arg @ref LL_DMAMUX_REQ_GEN_3
1974   * @retval State of bit (1 or 0).
1975   */
LL_DMAMUX_IsEnabledIT_RGO(DMAMUX_Channel_TypeDef * DMAMUXx,uint32_t RequestGenChannel)1976 __STATIC_INLINE uint32_t LL_DMAMUX_IsEnabledIT_RGO(DMAMUX_Channel_TypeDef *DMAMUXx, uint32_t RequestGenChannel)
1977 {
1978   UNUSED(DMAMUXx);
1979   return ((READ_BIT(((DMAMUX_RequestGen_TypeDef *)((uint32_t)((uint32_t)DMAMUX1_RequestGenerator0 + (DMAMUX_RGCR_SIZE *
1980                                                               (RequestGenChannel)))))->RGCR, DMAMUX_RGxCR_OIE) == (DMAMUX_RGxCR_OIE)) ? 1UL : 0UL);
1981 }
1982 
1983 /**
1984   * @}
1985   */
1986 
1987 /**
1988   * @}
1989   */
1990 
1991 /**
1992   * @}
1993   */
1994 
1995 #endif /* DMAMUX1 */
1996 
1997 /**
1998   * @}
1999   */
2000 
2001 #ifdef __cplusplus
2002 }
2003 #endif
2004 
2005 #endif /* __STM32G4xx_LL_DMAMUX_H */
2006 
2007