can a pin be both InterruptIn and DigitalIn

26 Jul 2010

I'd like to confirm that it is valid to assign a pin to be both InterruptIn and DigitalIn. For example

InterruptIn edge_trigger(p8);
DigitalIn level_sense(p8);

27 Jul 2010 . Edited: 27 Jul 2010

I have done this several times, with no problems at all.

I use it in software debounce, as it has to wait a while, then check the level of the pin, to see if button is still pressed.

/ Lerche

10 Jun 2012

If my lcd display is using p28, can i also use p28 for an interruptIN