what is a "callback object" (<class 'irq'>)

General discussions and questions abound development of code with MicroPython that is not hardware specific.
Target audience: MicroPython Users.
Post Reply
ericwertz
Posts: 3
Joined: Sat Jan 13, 2018 11:58 pm

what is a "callback object" (<class 'irq'>)

Post by ericwertz » Fri Feb 25, 2022 2:52 am

The docs for machine.Pin.irq() states that:
"This method returns a callback object."

I cannot find any leads on this anywhere that I've looked (and I have).
When I print(type()) the return value, I get "<class 'irq'>". Same... I can't find/figure-out what this is.

How can I use this for fun and profit? What does it buy me? I'm trying to piece together a mini-framework for event/interrupt handling and I'm looking to capture all of the info that I can from what's available, but this is (literally) opaque to me at this point.

Thanks in advance!
-e

Post Reply