void FTM_DRV_IRQHandler(uint8_t instance) { uint32_t ftmBaseAddr = g_ftmBaseAddr[instance]; /* Clear the Status flag if the interrupt is enabled */ if (FTM_HAL_IsOverflowIntEnabled(ftmBaseAddr)) { FTM_HAL_ClearTimerOverflow(ftmBaseAddr); } }
/*FUNCTION********************************************************************** * * Function Name : FTM_DRV_IRQHandler * Description : Initializes the Real Time Clock module * This function will initialize the Real Time Clock module. * *END**************************************************************************/ void FTM_DRV_IRQHandler(uint32_t instance) { FTM_Type *ftmBase = g_ftmBase[instance]; uint16_t channel; /* Clear the Status flag if the interrupt is enabled */ if (FTM_HAL_IsOverflowIntEnabled(ftmBase)) { FTM_HAL_ClearTimerOverflow(ftmBase); } for (channel = 0; channel < g_ftmChannelCount[instance]; channel++) { if (FTM_HAL_IsChnIntEnabled(ftmBase, channel)) { FTM_HAL_ClearChnEventStatus(ftmBase, channel); } } }