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

Dependents:   Programa_juego_info

Fork of PinDetect by Andy K

Files at this revision

API Documentation at this revision

Comitter:
rodomnz
Date:
Sun May 11 04:30:51 2014 +0000
Parent:
2:cb3afc45028b
Commit message:
C?digo Para Juego de Aros Ultras?nicos utilizando la tarjeta freedom KL25Z

Changed in this revision

PinDetect.h Show annotated file Show diff for this revision Revisions of this file
diff -r cb3afc45028b -r 1e646b45d581 PinDetect.h
--- 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