InterruptIn style DigitalIn debounced with callbacks for pin state change and pin state hold.

Dependents:   AVC_20110423 SimplePIDBot Pushbutton_Debounce_Interrupt FinalProgram ... more

Changed to add KL25Z.

By default the PinDetect constructor sets the default PinMode to PullDown.

PullDown is not available for KL25 and is not present in mbed library's Pinnames.h so when you compile the following error appears:

Error: Identifier "PullDown" is undefined in "PinDetect/PinDetect.h", Line: 182, Col: 17

This happens even if I try to create the PinDetect in this way(knowing the limitations of my platform):

PinDetect plus_button(PTA4,PullUp);

I have avoid this just changing the constructor to the following:

/ PinDetect constructor

By default the PinMode is set to PullDefault. @see http://mbed.org/handbook/DigitalIn @param p PinName is a valid pin that supports DigitalIn / PinDetect(PinName p) { init( p, PullDefault ); }

PullDefault is platform dependant it is PullUp for KL25Z and PullDown for LPC11Uxx for example.

Changed to add KL25Z.