switch(__even_in_range(TA0IV,14))
{
case 0: break;
case 2: if (TA0CCTL1 & CCI) // Capture Input Pin Status
{
// Rising Edge was captured
if (!Count)
{
REdge1 = TA0CCR1;
Count++;
}
else
{
REdge2 = TA0CCR1;
Count=0x0;
__bic_SR_register_on_exit(LPM0+ GIE); // Exit LPM0 on return to main
}
if (First_Time)
First_Time = 0x0;
}
else
{
// Falling Edge was captured
if(!First_Time)
{
FEdge = TA0CCR1;
}
}
break;
case 4: break;
case 6: break; // CCR3 not used
case 8: break; // CCR4 not used
case 10: break; // CCR5 not used
case 12: break; // Reserved not used
case 14: break;
default: break;
}
}