You will regret using too many macros later. Actually, you're regretting it already, as they don't work and, being macros, they are very difficult to debug.
Just a few points:
- your
LED_PIN(i)
expressions are always expanding to0
- your
LED_PORT(i)
expressions are always expanding toPORTE
whatever that may be
For instance LED_PIN(LED_ID_X)
expands to LED_PIN_X
. Note, macro parameter LED_ID_X
is not used at all. Instead, LED_PIN_X
simply expands to 0
.