📄 stm32f10x_cec.lst
字号:
\ 0000000C .... LDR.N R1,??DataTable12 ;; 0x40007800
\ 0000000E 0968 LDR R1,[R1, #+0]
\ 00000010 C907 LSLS R1,R1,#+31
\ 00000012 FBD4 BMI.N ??CEC_Cmd_1
174 {
175 }
176 }
177 }
\ ??CEC_Cmd_0:
\ 00000014 7047 BX LR ;; return
178
179 /**
180 * @brief Enables or disables the CEC interrupt.
181 * @param NewState: new state of the CEC interrupt.
182 * This parameter can be: ENABLE or DISABLE.
183 * @retval None
184 */
\ In section .text, align 2, keep-with-next
185 void CEC_ITConfig(FunctionalState NewState)
186 {
187 /* Check the parameters */
188 assert_param(IS_FUNCTIONAL_STATE(NewState));
189
190 *(__IO uint32_t *) CFGR_IE_BB = (uint32_t)NewState;
\ CEC_ITConfig:
\ 00000000 .... LDR.N R1,??DataTable12_2 ;; 0x420f0004
\ 00000002 C0B2 UXTB R0,R0 ;; ZeroExt R0,R0,#+24,#+24
\ 00000004 0860 STR R0,[R1, #+0]
191 }
\ 00000006 7047 BX LR ;; return
192
193 /**
194 * @brief Defines the Own Address of the CEC device.
195 * @param CEC_OwnAddress: The CEC own address
196 * @retval None
197 */
\ In section .text, align 2, keep-with-next
198 void CEC_OwnAddressConfig(uint8_t CEC_OwnAddress)
199 {
200 /* Check the parameters */
201 assert_param(IS_CEC_ADDRESS(CEC_OwnAddress));
202
203 /* Set the CEC own address */
204 CEC->OAR = CEC_OwnAddress;
\ CEC_OwnAddressConfig:
\ 00000000 .... LDR.N R1,??DataTable12_3 ;; 0x40007804
\ 00000002 C0B2 UXTB R0,R0 ;; ZeroExt R0,R0,#+24,#+24
\ 00000004 0860 STR R0,[R1, #+0]
205 }
\ 00000006 7047 BX LR ;; return
206
207 /**
208 * @brief Sets the CEC prescaler value.
209 * @param CEC_Prescaler: CEC prescaler new value
210 * @retval None
211 */
\ In section .text, align 2, keep-with-next
212 void CEC_SetPrescaler(uint16_t CEC_Prescaler)
213 {
214 /* Check the parameters */
215 assert_param(IS_CEC_PRESCALER(CEC_Prescaler));
216
217 /* Set the Prescaler value*/
218 CEC->PRES = CEC_Prescaler;
\ CEC_SetPrescaler:
\ 00000000 .... LDR.N R1,??DataTable12_4 ;; 0x40007808
\ 00000002 80B2 UXTH R0,R0 ;; ZeroExt R0,R0,#+16,#+16
\ 00000004 0860 STR R0,[R1, #+0]
219 }
\ 00000006 7047 BX LR ;; return
220
221 /**
222 * @brief Transmits single data through the CEC peripheral.
223 * @param Data: the data to transmit.
224 * @retval None
225 */
\ In section .text, align 2, keep-with-next
226 void CEC_SendDataByte(uint8_t Data)
227 {
228 /* Transmit Data */
229 CEC->TXD = Data ;
\ CEC_SendDataByte:
\ 00000000 .... LDR.N R1,??DataTable12_5 ;; 0x40007814
\ 00000002 C0B2 UXTB R0,R0 ;; ZeroExt R0,R0,#+24,#+24
\ 00000004 0860 STR R0,[R1, #+0]
230 }
\ 00000006 7047 BX LR ;; return
231
232
233 /**
234 * @brief Returns the most recent received data by the CEC peripheral.
235 * @param None
236 * @retval The received data.
237 */
\ In section .text, align 2, keep-with-next
238 uint8_t CEC_ReceiveDataByte(void)
239 {
240 /* Receive Data */
241 return (uint8_t)(CEC->RXD);
\ CEC_ReceiveDataByte:
\ 00000000 .... LDR.N R0,??DataTable12_6 ;; 0x40007818
\ 00000002 0068 LDR R0,[R0, #+0]
\ 00000004 C0B2 UXTB R0,R0 ;; ZeroExt R0,R0,#+24,#+24
\ 00000006 7047 BX LR ;; return
242 }
243
244 /**
245 * @brief Starts a new message.
246 * @param None
247 * @retval None
248 */
\ In section .text, align 2, keep-with-next
249 void CEC_StartOfMessage(void)
250 {
251 /* Starts of new message */
252 *(__IO uint32_t *) CSR_TSOM_BB = (uint32_t)0x1;
\ CEC_StartOfMessage:
\ 00000000 .... LDR.N R0,??DataTable12_7 ;; 0x420f0200
\ 00000002 0121 MOVS R1,#+1
\ 00000004 0160 STR R1,[R0, #+0]
253 }
\ 00000006 7047 BX LR ;; return
254
255 /**
256 * @brief Transmits message with or without an EOM bit.
257 * @param NewState: new state of the CEC Tx End Of Message.
258 * This parameter can be: ENABLE or DISABLE.
259 * @retval None
260 */
\ In section .text, align 2, keep-with-next
261 void CEC_EndOfMessageCmd(FunctionalState NewState)
262 {
263 /* Check the parameters */
264 assert_param(IS_FUNCTIONAL_STATE(NewState));
265
266 /* The data byte will be transmitted with or without an EOM bit*/
267 *(__IO uint32_t *) CSR_TEOM_BB = (uint32_t)NewState;
\ CEC_EndOfMessageCmd:
\ 00000000 .... LDR.N R1,??DataTable12_8 ;; 0x420f0204
\ 00000002 C0B2 UXTB R0,R0 ;; ZeroExt R0,R0,#+24,#+24
\ 00000004 0860 STR R0,[R1, #+0]
268 }
\ 00000006 7047 BX LR ;; return
269
270 /**
271 * @brief Gets the CEC flag status
272 * @param CEC_FLAG: specifies the CEC flag to check.
273 * This parameter can be one of the following values:
274 * @arg CEC_FLAG_BTE: Bit Timing Error
275 * @arg CEC_FLAG_BPE: Bit Period Error
276 * @arg CEC_FLAG_RBTFE: Rx Block Transfer Finished Error
277 * @arg CEC_FLAG_SBE: Start Bit Error
278 * @arg CEC_FLAG_ACKE: Block Acknowledge Error
279 * @arg CEC_FLAG_LINE: Line Error
280 * @arg CEC_FLAG_TBTFE: Tx Block Transfer Finsihed Error
281 * @arg CEC_FLAG_TEOM: Tx End Of Message
282 * @arg CEC_FLAG_TERR: Tx Error
283 * @arg CEC_FLAG_TBTRF: Tx Byte Transfer Request or Block Transfer Finished
284 * @arg CEC_FLAG_RSOM: Rx Start Of Message
285 * @arg CEC_FLAG_REOM: Rx End Of Message
286 * @arg CEC_FLAG_RERR: Rx Error
287 * @arg CEC_FLAG_RBTF: Rx Byte/Block Transfer Finished
288 * @retval The new state of CEC_FLAG (SET or RESET)
289 */
\ In section .text, align 2, keep-with-next
290 FlagStatus CEC_GetFlagStatus(uint32_t CEC_FLAG)
291 {
\ CEC_GetFlagStatus:
\ 00000000 10B4 PUSH {R4}
\ 00000002 0100 MOVS R1,R0
292 FlagStatus bitstatus = RESET;
\ 00000004 0020 MOVS R0,#+0
293 uint32_t cecreg = 0, cecbase = 0;
\ 00000006 0022 MOVS R2,#+0
\ 00000008 0023 MOVS R3,#+0
294
295 /* Check the parameters */
296 assert_param(IS_CEC_GET_FLAG(CEC_FLAG));
297
298 /* Get the CEC peripheral base address */
299 cecbase = (uint32_t)(CEC_BASE);
\ 0000000A .... LDR.N R4,??DataTable12 ;; 0x40007800
\ 0000000C 2300 MOVS R3,R4
300
301 /* Read flag register index */
302 cecreg = CEC_FLAG >> 28;
\ 0000000E 0C0F LSRS R4,R1,#+28
\ 00000010 2200 MOVS R2,R4
303
304 /* Get bit[23:0] of the flag */
305 CEC_FLAG &= FLAG_Mask;
\ 00000012 0902 LSLS R1,R1,#+8
\ 00000014 090A LSRS R1,R1,#+8
306
307 if(cecreg != 0)
\ 00000016 002A CMP R2,#+0
\ 00000018 02D0 BEQ.N ??CEC_GetFlagStatus_0
308 {
309 /* Flag in CEC ESR Register */
310 CEC_FLAG = (uint32_t)(CEC_FLAG >> 16);
\ 0000001A 090C LSRS R1,R1,#+16
311
312 /* Get the CEC ESR register address */
313 cecbase += 0xC;
\ 0000001C 0C33 ADDS R3,R3,#+12
\ 0000001E 00E0 B.N ??CEC_GetFlagStatus_1
314 }
315 else
316 {
317 /* Get the CEC CSR register address */
318 cecbase += 0x10;
\ ??CEC_GetFlagStatus_0:
\ 00000020 1033 ADDS R3,R3,#+16
319 }
320
321 if(((*(__IO uint32_t *)cecbase) & CEC_FLAG) != (uint32_t)RESET)
\ ??CEC_GetFlagStatus_1:
\ 00000022 1C68 LDR R4,[R3, #+0]
\ 00000024 0C42 TST R4,R1
\ 00000026 02D0 BEQ.N ??CEC_GetFlagStatus_2
322 {
323 /* CEC_FLAG is set */
324 bitstatus = SET;
\ 00000028 0124 MOVS R4,#+1
\ 0000002A 2000 MOVS R0,R4
\ 0000002C 01E0 B.N ??CEC_GetFlagStatus_3
325 }
326 else
327 {
328 /* CEC_FLAG is reset */
329 bitstatus = RESET;
\ ??CEC_GetFlagStatus_2:
\ 0000002E 0024 MOVS R4,#+0
\ 00000030 2000 MOVS R0,R4
330 }
331
332 /* Return the CEC_FLAG status */
333 return bitstatus;
\ ??CEC_GetFlagStatus_3:
\ 00000032 C0B2 UXTB R0,R0 ;; ZeroExt R0,R0,#+24,#+24
\ 00000034 10BC POP {R4}
\ 00000036 7047 BX LR ;; return
334 }
335
336 /**
337 * @brief Clears the CEC's pending flags.
338 * @param CEC_FLAG: specifies the flag to clear.
339 * This parameter can be any combination of the following values:
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -