/elec/propeller-clock

To get this branch, use:
bzr branch http://bzr.ed.am/elec/propeller-clock

« back to all changes in this revision

Viewing changes to src/util/Bounce.cpp

  • Committer: edam
  • Date: 2012-02-08 23:32:34 UTC
  • Revision ID: edam@waxworlds.org-20120208233234-4h5pzeetrz0vp91f
added phantom button press test and temporarily disabled pin 4 (that drives the PNP transistor)

Show diffs side-by-side

added added

removed removed

1
1
 
2
2
// Please read Bounce.h for information about the liscence and authors
3
3
 
4
 
#include "WProgram.h"
 
4
#include <Arduino.h>
5
5
#include "Bounce.h"
6
6
 
7
7
 
81
81
        
82
82
}
83
83
 
84
 
// The risingEdge method is true for one scan after the de-bounced input goes from off-to-on.
 
84
// The risingEdge method is true for one scan after the de-bounced
 
85
// input goes from off-to-on.
85
86
bool  Bounce::risingEdge() { return stateChanged && state; }
86
 
// The fallingEdge  method it true for one scan after the de-bounced input goes from on-to-off. 
 
87
// The fallingEdge method it true for one scan after the de-bounced
 
88
// input goes from on-to-off.
87
89
bool  Bounce::fallingEdge() { return stateChanged && !state; }
88
90