pinio.h: apply the formatting used for ARM for AVR as well.

No functinal change.
This commit is contained in:
Markus Hitter 2015-07-26 12:16:16 +02:00
parent 2c90a2dfc7
commit 2b52233a2d
1 changed files with 5 additions and 3 deletions

View File

@ -31,9 +31,11 @@
/// Read a pin.
#define _READ(IO) (IO ## _RPORT & MASK(IO ## _PIN))
/// Write to a pin.
#define _WRITE(IO, v) do { if (v) { IO ## _WPORT |= MASK(IO ## _PIN); } \
else { IO ## _WPORT &= ~MASK(IO ## _PIN); }; } \
while (0)
#define _WRITE(IO, v) \
do { \
if (v) { IO ## _WPORT |= MASK(IO ## _PIN); } \
else { IO ## _WPORT &= ~MASK(IO ## _PIN); } \
} while (0)
/// Toggle a pin.
#define _TOGGLE(IO) do { IO ## _RPORT = MASK(IO ## _PIN); } while (0)