Igor Skochinsky
/
FastIO
Fast GPIO using C++ templates. Now with port I/O.
Revision 2:9c4a8c01862c, committed 2010-05-22
- 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() {