The wait_for_edge() function is designed to block execution of your program until an edge is detected.
The translation is wait_for_edge will block the program until an edge event is triggered
The event_detected() function is designed to be used in a loop with other things, but unlike polling it is not going to miss the change in state of an input while the CPU is busy working on other things.
event_detected is the event trigger
Specifically for you, if you want to interrupt the request, it can only be triggered by an event.
The first step is to pull up the interface resistor
The translation is wait_for_edge will block the program until an edge event is triggered
event_detected is the event trigger
Specifically for you, if you want to interrupt the request, it can only be triggered by an event.
The first step is to pull up the interface resistor
Then