Read an input signal with just ONE INTERRUPT!!!

Thank you very much for your answers and sorry for my the late reply. I have been so busy these days but now I will focus on this car project.

I copy down you my ISR (Interrupt Service Routine). As you can see I do an interruption when there's a RISE and where there's a FALL in order to calculate the pulse_duration, that is what I want to calculate.

My question was if I can calculate this pulse_duration just with one interrupt in the FALL.

I have checked about ICR, but I don't really understand what it does and if it can help me. So if you think that ICR would solve my problem, could you explain me how it would be in my code?

Thank you again for your answers!


ISR (PCINT1_vect)
{
current_time = micros();
// Is input 14 HIGH?
if (PINC & B00000001) {
// It was the input 14 low (RISE)
if (pulse_state == 0) {
// Update pulse_state
pulse_state = 1;
edge_time = current_time; //time of the RISE
}
}
// Is input 14 LOW? It was the input 14 HIGH (FALL)
else if (receiver_steer.pulse_state == 1) {
// Update pulse_state
pulse_state = 0;
pulse_duration = current_time - edge_time; //we get the pulse duration
}