I have an application where I want to measure the low and high periods of a waveform coming in on a Timer capture pin. I have figured out how to do this by using the TimerControlEvent() function and setting it to TIMER_EVENT_BOTH_EDGES. This works great but in my interrupt routine I want to know if I am getting an interrupt for a rising edge or a falling edge. I have tried the function GPIOPinRead() but this always returns a LO state regardless of the interrupt presumeably because the pin is set as a timer capture pin rather than a GPIO.
Is there any way I can sense the state of the pin in the interrupt routine?