10 years, 7 months ago.

Needs a change to support FRDM-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 PullUp.
  • @see http://mbed.org/handbook/DigitalIn
  • @param p PinName is a valid pin that supports DigitalIn
  • / PinDetect(PinName p) { init( p, PullUp ); }

Question relating to:

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

Hello Oskar Lopez de Gamboa, there's PinMode - PullDefault, which is set to PullUP for KL25Z for example. You can implement your proposed change, and send a pull request to PinDetect library.

posted by Martin Kojtal 15 May 2014

@Martin: I see both Oskar and I sent pull requests to the library with PullDefault change implemented.

posted by Bjoern Hartmann 05 Aug 2014
Be the first to answer this question.