InterruptIn style DigitalIn debounced with callbacks for pin state change and pin state hold.
Dependents: Programa_juego_info
Fork of PinDetect by
Diff: PinDetect.h
- Revision:
- 3:1e646b45d581
- Parent:
- 2:cb3afc45028b
--- a/PinDetect.h Thu Jan 13 11:09:22 2011 +0000 +++ b/PinDetect.h Sun May 11 04:30:51 2014 +0000 @@ -1,6 +1,9 @@ /* Copyright (c) 2010 Andy Kirkham + + Copyright (c) 2010 Andy Kirkham + Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights @@ -177,8 +180,8 @@ * @see http://mbed.org/handbook/DigitalIn * @param p PinName is a valid pin that supports DigitalIn */ - PinDetect(PinName p) { - init( p, PullDown ); + PinDetect(PinName p, PinMode m) { + init( p, PullUp ); } /** PinDetect constructor @@ -187,8 +190,8 @@ * @param PinName p is a valid pin that supports DigitalIn * @param PinMode m The mode the DigitalIn should use. */ - PinDetect(PinName p, PinMode m) { - init( p, m ); + PinDetect(PinName p) { + init( p, PullUp ); } /** PinDetect destructor