Question
STM32F1xx HAL UserManual __HAL_DMA_GET_IT_SOURCE confused me
Posted on January 31, 2015 at 13:42
#define __HAL_DMA_GET_IT_SOURCE ( __HANDLE__, __INTERRUPT__ ) ((((__HANDLE__)->Instance->CCR & (__INTERRUPT__)) == (__INTERRUPT__)) ? SET : RESET)
The documentation has such a definition for this macro:
Checks whether the specified DMA Channel interrupt has occurred or not. And the documentation said the __INTERRUPT__ can be one of the following values:
•DMA_IT_TC: Transfer complete interrupt mask
•DMA_IT_HT: Half transfer complete interrupt mask
•DMA_IT_TE: Transfer error interrupt mask
But I'm thinking this macro actually checks if the specified DMA Interrupt is enabled or not.
If I want to check which interrupt is signalled I should check
DMA Inerrupt status register (DMA_ISR) instead of DMA channel x configuration register ( DMA_CCRx)?
Please correct me if I made any mistake here.
Many thanks.