Quick Question about defining the volatile variables for interrupts.
All documentation I read has us use
volatile int _myState = LOW;
This has always worked for me, and I don’t particularly have a problem with it; however my mind can’t wrap around why you wouldn’t use something like:
volatile bool _myState = false;
for the same variable. Wouldn’t this be a better solution (my guess is not, since smarter people than me write the documentation for this stuff).
My question is why do we use volatile int instead of volatile boot when we are dealing with HIGH/LOW, true, false, and 0/1’s?