pinio.h: apply the formatting used for ARM for AVR as well.
No functinal change.
This commit is contained in:
parent
2c90a2dfc7
commit
2b52233a2d
8
pinio.h
8
pinio.h
|
|
@ -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)
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue