reading of events on gpio pins for switch
Posted: 26 Sep 2018, 22:46
Hello,
I was searching in source code of uPyEasy in branch "master" for a place, when interrupt (irq / external even listener / isr ... however you call it) is configured on GPIO, if such GPIO is configured for switch.
However i didn't find any. I only found aswitch.py with these lines:
loop = asyncio.get_event_loop()
loop.create_task(self.switchcheck()) # Thread runs forever
Did i overlook it, or is there really no interrupt registered and only relying on fact, that one of these reads will detect pressed state (specially if i have push button)? Cannot it then happen, that button press was in between of two checks and hence not detected at all?
How often is event loop running? Isn't its run actually dealyed, if i do network communication?
thank you
best regards
jano
I was searching in source code of uPyEasy in branch "master" for a place, when interrupt (irq / external even listener / isr ... however you call it) is configured on GPIO, if such GPIO is configured for switch.
However i didn't find any. I only found aswitch.py with these lines:
loop = asyncio.get_event_loop()
loop.create_task(self.switchcheck()) # Thread runs forever
Did i overlook it, or is there really no interrupt registered and only relying on fact, that one of these reads will detect pressed state (specially if i have push button)? Cannot it then happen, that button press was in between of two checks and hence not detected at all?
How often is event loop running? Isn't its run actually dealyed, if i do network communication?
thank you
best regards
jano