Unregistering an EXTI - pyb

General discussions and questions abound development of code with MicroPython that is not hardware specific.
Target audience: MicroPython Users.
Post Reply
lnsri22
Posts: 75
Joined: Fri Aug 17, 2018 12:16 pm
Location: India

Unregistering an EXTI - pyb

Post by lnsri22 » Sat Nov 02, 2019 9:59 am

Hello Everyone!!

I am trying to use EXTI with pyb. How do I un register a previously registered interrupt and register it again.

Thanks!!
lnsri22 :)

User avatar
jimmo
Posts: 2754
Joined: Tue Aug 08, 2017 1:57 am
Location: Sydney, Australia
Contact:

Re: Unregistering an EXTI - pyb

Post by jimmo » Mon Nov 04, 2019 12:48 am

Are you using pyb.ExtInt ? http://docs.micropython.org/en/latest/l ... xtInt.html

You can use the enable and disable methods.

Otherwise if you're using Pin interrupts (i.e. machine.Pin), you can use pin.irq(handler=None) to disable the interrupt.

lnsri22
Posts: 75
Joined: Fri Aug 17, 2018 12:16 pm
Location: India

Re: Unregistering an EXTI - pyb

Post by lnsri22 » Thu Nov 07, 2019 6:02 am

Thanks for the suggestion!!

Let me give it a try and get back
lnsri22 :)

lnsri22
Posts: 75
Joined: Fri Aug 17, 2018 12:16 pm
Location: India

Re: Unregistering an EXTI - pyb

Post by lnsri22 » Sun Mar 08, 2020 12:22 pm

Thanks again!!

Sorry for getting back too late on this.

Worked as well
lnsri22 :)

Post Reply