This is a very tiny library which counts DigitalIn rising , using "Ticker" interrupts.

Fork of Pswitch_Lib by Kero Sunutte

Files at this revision

API Documentation at this revision

Comitter:
lilac0112_1
Date:
Tue Sep 23 08:42:55 2014 +0000
Parent:
1:a0eb75ae437f
Commit message:
LCD??

Changed in this revision

Pswitch.cpp Show annotated file Show diff for this revision Revisions of this file
ReadMe.txt Show annotated file Show diff for this revision Revisions of this file
--- a/Pswitch.cpp	Thu Dec 23 14:56:50 2010 +0000
+++ b/Pswitch.cpp	Tue Sep 23 08:42:55 2014 +0000
@@ -8,7 +8,9 @@
   */
  Pswitch::Pswitch(PinName in) 
      : _in(in) {    
-         
+     
+     _in.mode(PullUp);
+     
      // reset all the flags and counters    
      _samples = 0;
      _output = 0;
@@ -30,9 +32,6 @@
 	}
 
 }
-
- 
- 
  
  // return number of rising edges
  int Pswitch::count(void) {
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/ReadMe.txt	Tue Sep 23 08:42:55 2014 +0000
@@ -0,0 +1,1 @@
+Pswitch.cppの12行目は本家には書かれていません.
\ No newline at end of file