MCU: Stellaris Lauchpad, LM4F120.
I have a GPIO input pin which is being fed with a signal. I need to sense both edges of the interrupt, so I successively use GPIO_BOTH_EDGES and that works great.
But. In the interrupt routine, I need to handle two different cases: when it's rising edge, and when it's falling edge.
How to properly implement that, to know what edge caused this specific interrupt? Just reading the input pin immediately in the beginning of the interrupt doesn't seem to do the trick.