Hello ccrause,
thank you for your example code!
Perhaps you need to give an example here, in my limited understanding wiringPi relies on the OS kernel to call the interrupt handler. So no waiting is required? Perhaps you need to explain a bit more what your requirements are.
My requirement/application is to count pulses of an anemometer.
The output of the anemometer is a simple switch bound to 3,3V via a pullup-resistor.
Every time he switch of the anemometer pulls the GPIO of the RasPi to ground an interrupt should be triggered.
The software counts the pulses in a period of time, calculates the windspeed and displayes it on a label of a form.
A question to your example code:
I do not understand why an output has to be put to high in order to start (start what)?
Line 49 of your code
Why put that pin to low to stop (stop what)?
Line 34 of your code