Fast GPIO using C++ templates. Now with port I/O.

Dependencies:   mbed

Files at this revision

API Documentation at this revision

Comitter:
igorsk
Date:
Sat May 22 23:13:55 2010 +0000
Parent:
1:8064f8b8cf82
Child:
3:8d217a0bb245
Commit message:

Changed in this revision

FastIO.h Show annotated file Show diff for this revision Revisions of this file
--- a/FastIO.h	Sat May 22 22:58:38 2010 +0000
+++ b/FastIO.h	Sat May 22 23:13:55 2010 +0000
@@ -83,10 +83,8 @@
     }
     void write(int value)
     {
-        if ( value & mask )
-            PORTDEFPORT(port)->FIOSET = value & mask;
-        if ( value & ~mask )
-            PORTDEFPORT(port)->FIOCLR = value & ~mask;
+        PORTDEFPORT(port)->FIOSET = value & mask;
+        PORTDEFPORT(port)->FIOCLR = value & ~mask;
     } 
     int read()
     {