📄 stm32f10x_dac.lst
字号:
148 */
\ In section .text, align 2, keep-with-next
149 void DAC_StructInit(DAC_InitTypeDef* DAC_InitStruct)
150 {
151 /*--------------- Reset DAC init structure parameters values -----------------*/
152 /* Initialize the DAC_Trigger member */
153 DAC_InitStruct->DAC_Trigger = DAC_Trigger_None;
\ DAC_StructInit:
\ 00000000 0021 MOVS R1,#+0
\ 00000002 0160 STR R1,[R0, #+0]
154 /* Initialize the DAC_WaveGeneration member */
155 DAC_InitStruct->DAC_WaveGeneration = DAC_WaveGeneration_None;
\ 00000004 0021 MOVS R1,#+0
\ 00000006 4160 STR R1,[R0, #+4]
156 /* Initialize the DAC_LFSRUnmask_TriangleAmplitude member */
157 DAC_InitStruct->DAC_LFSRUnmask_TriangleAmplitude = DAC_LFSRUnmask_Bit0;
\ 00000008 0021 MOVS R1,#+0
\ 0000000A 8160 STR R1,[R0, #+8]
158 /* Initialize the DAC_OutputBuffer member */
159 DAC_InitStruct->DAC_OutputBuffer = DAC_OutputBuffer_Enable;
\ 0000000C 0021 MOVS R1,#+0
\ 0000000E C160 STR R1,[R0, #+12]
160 }
\ 00000010 7047 BX LR ;; return
161
162 /**
163 * @brief Enables or disables the specified DAC channel.
164 * @param DAC_Channel: the selected DAC channel.
165 * This parameter can be one of the following values:
166 * @arg DAC_Channel_1: DAC Channel1 selected
167 * @arg DAC_Channel_2: DAC Channel2 selected
168 * @param NewState: new state of the DAC channel.
169 * This parameter can be: ENABLE or DISABLE.
170 * @retval None
171 */
\ In section .text, align 2, keep-with-next
172 void DAC_Cmd(uint32_t DAC_Channel, FunctionalState NewState)
173 {
174 /* Check the parameters */
175 assert_param(IS_DAC_CHANNEL(DAC_Channel));
176 assert_param(IS_FUNCTIONAL_STATE(NewState));
177 if (NewState != DISABLE)
\ DAC_Cmd:
\ 00000000 C9B2 UXTB R1,R1 ;; ZeroExt R1,R1,#+24,#+24
\ 00000002 0029 CMP R1,#+0
\ 00000004 07D0 BEQ.N ??DAC_Cmd_0
178 {
179 /* Enable the selected DAC channel */
180 DAC->CR |= (DAC_CR_EN1 << DAC_Channel);
\ 00000006 .... LDR.N R2,??DataTable9 ;; 0x40007400
\ 00000008 1268 LDR R2,[R2, #+0]
\ 0000000A 0123 MOVS R3,#+1
\ 0000000C 8340 LSLS R3,R3,R0
\ 0000000E 1A43 ORRS R2,R3,R2
\ 00000010 .... LDR.N R3,??DataTable9 ;; 0x40007400
\ 00000012 1A60 STR R2,[R3, #+0]
\ 00000014 06E0 B.N ??DAC_Cmd_1
181 }
182 else
183 {
184 /* Disable the selected DAC channel */
185 DAC->CR &= ~(DAC_CR_EN1 << DAC_Channel);
\ ??DAC_Cmd_0:
\ 00000016 .... LDR.N R2,??DataTable9 ;; 0x40007400
\ 00000018 1268 LDR R2,[R2, #+0]
\ 0000001A 0123 MOVS R3,#+1
\ 0000001C 8340 LSLS R3,R3,R0
\ 0000001E 9A43 BICS R2,R2,R3
\ 00000020 .... LDR.N R3,??DataTable9 ;; 0x40007400
\ 00000022 1A60 STR R2,[R3, #+0]
186 }
187 }
\ ??DAC_Cmd_1:
\ 00000024 7047 BX LR ;; return
188 #if defined (STM32F10X_LD_VL) || defined (STM32F10X_MD_VL) || defined (STM32F10X_HD_VL)
189 /**
190 * @brief Enables or disables the specified DAC interrupts.
191 * @param DAC_Channel: the selected DAC channel.
192 * This parameter can be one of the following values:
193 * @arg DAC_Channel_1: DAC Channel1 selected
194 * @arg DAC_Channel_2: DAC Channel2 selected
195 * @param DAC_IT: specifies the DAC interrupt sources to be enabled or disabled.
196 * This parameter can be the following values:
197 * @arg DAC_IT_DMAUDR: DMA underrun interrupt mask
198 * @param NewState: new state of the specified DAC interrupts.
199 * This parameter can be: ENABLE or DISABLE.
200 * @retval None
201 */
202 void DAC_ITConfig(uint32_t DAC_Channel, uint32_t DAC_IT, FunctionalState NewState)
203 {
204 /* Check the parameters */
205 assert_param(IS_DAC_CHANNEL(DAC_Channel));
206 assert_param(IS_FUNCTIONAL_STATE(NewState));
207 assert_param(IS_DAC_IT(DAC_IT));
208
209 if (NewState != DISABLE)
210 {
211 /* Enable the selected DAC interrupts */
212 DAC->CR |= (DAC_IT << DAC_Channel);
213 }
214 else
215 {
216 /* Disable the selected DAC interrupts */
217 DAC->CR &= (~(uint32_t)(DAC_IT << DAC_Channel));
218 }
219 }
220 #endif
221
222 /**
223 * @brief Enables or disables the specified DAC channel DMA request.
224 * @param DAC_Channel: the selected DAC channel.
225 * This parameter can be one of the following values:
226 * @arg DAC_Channel_1: DAC Channel1 selected
227 * @arg DAC_Channel_2: DAC Channel2 selected
228 * @param NewState: new state of the selected DAC channel DMA request.
229 * This parameter can be: ENABLE or DISABLE.
230 * @retval None
231 */
\ In section .text, align 2, keep-with-next
232 void DAC_DMACmd(uint32_t DAC_Channel, FunctionalState NewState)
233 {
234 /* Check the parameters */
235 assert_param(IS_DAC_CHANNEL(DAC_Channel));
236 assert_param(IS_FUNCTIONAL_STATE(NewState));
237 if (NewState != DISABLE)
\ DAC_DMACmd:
\ 00000000 C9B2 UXTB R1,R1 ;; ZeroExt R1,R1,#+24,#+24
\ 00000002 0029 CMP R1,#+0
\ 00000004 08D0 BEQ.N ??DAC_DMACmd_0
238 {
239 /* Enable the selected DAC channel DMA request */
240 DAC->CR |= (DAC_CR_DMAEN1 << DAC_Channel);
\ 00000006 .... LDR.N R2,??DataTable9 ;; 0x40007400
\ 00000008 1268 LDR R2,[R2, #+0]
\ 0000000A 4FF48053 MOV R3,#+4096
\ 0000000E 8340 LSLS R3,R3,R0
\ 00000010 1A43 ORRS R2,R3,R2
\ 00000012 .... LDR.N R3,??DataTable9 ;; 0x40007400
\ 00000014 1A60 STR R2,[R3, #+0]
\ 00000016 07E0 B.N ??DAC_DMACmd_1
241 }
242 else
243 {
244 /* Disable the selected DAC channel DMA request */
245 DAC->CR &= ~(DAC_CR_DMAEN1 << DAC_Channel);
\ ??DAC_DMACmd_0:
\ 00000018 .... LDR.N R2,??DataTable9 ;; 0x40007400
\ 0000001A 1268 LDR R2,[R2, #+0]
\ 0000001C 4FF48053 MOV R3,#+4096
\ 00000020 8340 LSLS R3,R3,R0
\ 00000022 9A43 BICS R2,R2,R3
\ 00000024 .... LDR.N R3,??DataTable9 ;; 0x40007400
\ 00000026 1A60 STR R2,[R3, #+0]
246 }
247 }
\ ??DAC_DMACmd_1:
\ 00000028 7047 BX LR ;; return
248
249 /**
250 * @brief Enables or disables the selected DAC channel software trigger.
251 * @param DAC_Channel: the selected DAC channel.
252 * This parameter can be one of the following values:
253 * @arg DAC_Channel_1: DAC Channel1 selected
254 * @arg DAC_Channel_2: DAC Channel2 selected
255 * @param NewState: new state of the selected DAC channel software trigger.
256 * This parameter can be: ENABLE or DISABLE.
257 * @retval None
258 */
\ In section .text, align 2, keep-with-next
259 void DAC_SoftwareTriggerCmd(uint32_t DAC_Channel, FunctionalState NewState)
260 {
\ DAC_SoftwareTriggerCmd:
\ 00000000 10B4 PUSH {R4}
261 /* Check the parameters */
262 assert_param(IS_DAC_CHANNEL(DAC_Channel));
263 assert_param(IS_FUNCTIONAL_STATE(NewState));
264 if (NewState != DISABLE)
\ 00000002 C9B2 UXTB R1,R1 ;; ZeroExt R1,R1,#+24,#+24
\ 00000004 0029 CMP R1,#+0
\ 00000006 08D0 BEQ.N ??DAC_SoftwareTriggerCmd_0
265 {
266 /* Enable software trigger for the selected DAC channel */
267 DAC->SWTRIGR |= (uint32_t)DAC_SWTRIGR_SWTRIG1 << (DAC_Channel >> 4);
\ 00000008 .... LDR.N R2,??DataTable9_1 ;; 0x40007404
\ 0000000A 1268 LDR R2,[R2, #+0]
\ 0000000C 0123 MOVS R3,#+1
\ 0000000E 0409 LSRS R4,R0,#+4
\ 00000010 A340 LSLS R3,R3,R4
\ 00000012 1A43 ORRS R2,R3,R2
\ 00000014 .... LDR.N R3,??DataTable9_1 ;; 0x40007404
\ 00000016 1A60 STR R2,[R3, #+0]
\ 00000018 07E0 B.N ??DAC_SoftwareTriggerCmd_1
268 }
269 else
270 {
271 /* Disable software trigger for the selected DAC channel */
272 DAC->SWTRIGR &= ~((uint32_t)DAC_SWTRIGR_SWTRIG1 << (DAC_Channel >> 4));
\ ??DAC_SoftwareTriggerCmd_0:
\ 0000001A .... LDR.N R2,??DataTable9_1 ;; 0x40007404
\ 0000001C 1268 LDR R2,[R2, #+0]
\ 0000001E 0123 MOVS R3,#+1
\ 00000020 0409 LSRS R4,R0,#+4
\ 00000022 A340 LSLS R3,R3,R4
\ 00000024 9A43 BICS R2,R2,R3
\ 00000026 .... LDR.N R3,??DataTable9_1 ;; 0x40007404
\ 00000028 1A60 STR R2,[R3, #+0]
273 }
274 }
\ ??DAC_SoftwareTriggerCmd_1:
\ 0000002A 10BC POP {R4}
\ 0000002C 7047 BX LR ;; return
275
276 /**
277 * @brief Enables or disables simultaneously the two DAC channels software
278 * triggers.
279 * @param NewState: new state of the DAC channels software triggers.
280 * This parameter can be: ENABLE or DISABLE.
281 * @retval None
282 */
\ In section .text, align 2, keep-with-next
283 void DAC_DualSoftwareTriggerCmd(FunctionalState NewState)
284 {
285 /* Check the parameters */
286 assert_param(IS_FUNCTIONAL_STATE(NewState));
287 if (NewState != DISABLE)
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -