WizenedEE:
static uint16_t _lasttime, uint16_t _thistimeis illegal. You might be able to do some strange things with a struct though:
According to the standard. 6.5.3 - 3
If the for-init-statement is a declaration, the scope of the name(s) declared extends to the end of the for-statement.
But I see the static now,
. hmmm