/******************************************************************************* * mvSysTwsiMainCauseIsSet * * DESCRIPTION: * Check if the TWSI interrupt was triggered in the main interrupt cause * register. * * INPUT: * chanNum - TWSI channel number. * * OUTPUT: * None. * * RETURN: * MV_TRUE if interrupt was triggered. * MV_FALSE otherwise. * *******************************************************************************/ MV_BOOL mvSysTwsiMainCauseIsSet(MV_U32 chanNum) { MV_U32 val; val = MV_REG_READ(MV_TWSI_CPU_MAIN_INT_CAUSE(chanNum)); if (val & (1 << CPU_MAIN_INT_TWSI_OFFS(chanNum))) return MV_TRUE; return MV_FALSE; }
/******************************************************************************* * twsiMainIntGet - Get twsi bit from main Interrupt cause. * * DESCRIPTION: * This routine returns the twsi interrupt flag value. * * INPUT: * None. * * OUTPUT: * None. * * RETURN: * MV_TRUE is interrupt flag is set, MV_FALSE otherwise. * *******************************************************************************/ static MV_BOOL twsiMainIntGet(MV_U8 chanNum) { MV_U32 temp; /* get the int flag bit */ temp = MV_REG_READ(MV_TWSI_CPU_MAIN_INT_CAUSE(chanNum)); if (temp & (1<<CPU_MAIN_INT_TWSI_OFFS(chanNum))) /* (TWSI_CPU_MAIN_INT_BIT(chanNum))) */ return MV_TRUE; return MV_FALSE; }
/******************************************************************************* * mvSysTwsiMainCauseIsSet * * DESCRIPTION: * Check if the TWSI interrupt was triggered in the main interrupt cause * register. * * INPUT: * chanNum - TWSI channel number. * * OUTPUT: * None. * * RETURN: * MV_TRUE if interrupt was triggered. * MV_FALSE otherwise. * *******************************************************************************/ MV_BOOL mvSysTwsiMainCauseIsSet(MV_U32 chanNum) { MV_U32 val; /* Pass dummy 0 to keep compatibility with HAL */ val = MV_REG_READ(MV_TWSI_CPU_MAIN_INT_CAUSE(chanNum, 0)); if (val & (1 << CPU_MAIN_INT_TWSI_OFFS(chanNum))) return MV_TRUE; return MV_FALSE; }