Why do we have 2 separate functions, DMA_ClearFlag and DMA_ClearITPendingBit, since they are totally the same?
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
2021-02-25 2:39 AM
Dear,
These 2 functions are almost the same, the difference is the const DMA_FLAG_TCIFx and DMA_IT_TCIFx. However, when AND with the RESERVED_MASK (0x0F7D0F7D), it becomes the same. This also happens with EXTI_ClearFlag and EXTI_ClearITPendingBit.
For example,
DMA_FLAG_TCIF0 (0x10000020) AND (0x0F7D0F7D) = 0x20 = DMA_IT_TCIF0 (0x10008020) AND (0x0F7D0F7D)
DMA_FLAG_FEIF4 (0x20000001) AND (0x0F7D0F7D) = 1 = DMA_IT_FEIF4 (0xA0000001) AND (0x0F7D0F7D)
The code of these 2 functions:
Thank you for figuring me out.
Trico.
Labels:
- Labels:
-
DMA
1 REPLY 1
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
2021-03-06 2:17 AM
Please anyone help me figure this.
