I need to detect an falling edge on a gpio pin and have my code wait until it does that. I also need a way to stop the code from waiting for the falling edge and end the program. If anyone knows of any solutions or libraries I could use?? I'm coding in C.
I have a Raspberry Pi 4 2GB Ram.