From 19ae7c56b6a2f65cea495f31b469031695466de3 Mon Sep 17 00:00:00 2001 From: kliment Date: Sun, 10 Jul 2011 11:02:48 +0200 Subject: Force boolean return in READ --- Sprinter/fastio.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'Sprinter') 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 -- cgit v1.2.1