4 years, 3 months ago.

How can you detach a pin?

I am trying to detach pins from attach_asserted/attach_asserted_held. Is there a way other than attaching the input to a do-nothing function?


Question relating to:

InterruptIn style DigitalIn debounced with callbacks for pin state change and pin state hold. debounce, DigitalIn, InterruptIn
Comment on this question

1 Answer

4 years, 3 months ago.

You have it almost correct, call attach again but instead of using a do nothing function give it a null pointer.

You need to log in to post a question