button procedure library

Dependents:   MIDI_CW Gemphet8

Files at this revision

API Documentation at this revision

Comitter:
ChuckTimber
Date:
Sat Aug 09 04:37:50 2014 +0000
Parent:
3:1c47d318e457
Child:
5:04236df532fb
Commit message:
Fixed switch polarity.

Changed in this revision

button.cpp Show annotated file Show diff for this revision Revisions of this file
--- a/button.cpp	Thu Aug 07 03:59:45 2014 +0000
+++ b/button.cpp	Sat Aug 09 04:37:50 2014 +0000
@@ -4,7 +4,7 @@
  *  @file       button.cpp
  *  Project     button handling Library
  *  @brief      button handling library for mbed
- *  @version    1.0
+ *  @version    1.01
  *  @author     Chuck Timber
  *  @date       07/08/2014
  */
@@ -45,7 +45,7 @@
 {
     unsigned char a, b;
 
-    a = _Pin;
+    a = (_Pin) ? 0 : 1;
     
     if (a == FIL) {
         b = STAT;