summaryrefslogtreecommitdiff
path: root/Sprinter
diff options
context:
space:
mode:
authorkliment <kliment.yanev@gmail.com>2011-07-10 11:02:48 +0200
committerkliment <kliment.yanev@gmail.com>2011-07-10 11:02:48 +0200
commit19ae7c56b6a2f65cea495f31b469031695466de3 (patch)
tree8675245cbb928dda6b24ab6bf818b5126f5771aa /Sprinter
parent1c1b445268c2befe6d4fcf0ffec1fc2b3417f311 (diff)
Force boolean return in READ
Diffstat (limited to 'Sprinter')
-rw-r--r--Sprinter/fastio.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/Sprinter/fastio.h b/Sprinter/fastio.h
index 0ba2546..aa5ad0e 100644
--- a/Sprinter/fastio.h
+++ b/Sprinter/fastio.h
@@ -24,7 +24,7 @@
*/
/// Read a pin
-#define _READ(IO) (DIO ## IO ## _RPORT & MASK(DIO ## IO ## _PIN))
+#define _READ(IO) ((bool)(DIO ## IO ## _RPORT & MASK(DIO ## IO ## _PIN)))
/// write to a pin
#define _WRITE(IO, v) do { if (v) {DIO ## IO ## _WPORT |= MASK(DIO ## IO ## _PIN); } else {DIO ## IO ## _WPORT &= ~MASK(DIO ## IO ## _PIN); }; } while (0)
/// toggle a pin