that there are "working" code examples out there in the forum postsand in libraries that are using 0 and non zero to set the output pin state.
and that is why the core developers like Diligent/chipkit and Maplehave implemented their DigitalWrite() routines with the same HIGH/LOW values and assumptions.
But doing things like this come with added risk that if ever the defines change,the code may stop working as expected.
Is there a binary logic chip made that uses other than 0 for FALSE/LOW and 1 for TRUE/HIGH?Memory, controller, processor, register?
Is it conceivable that in any implementation of any language the HIGH will not be the logical inverse of LOW? These are hardware concepts and these nimby pimby software types had better get their head round that fact!
(Udo: All the examples that use exclusive ORing, would break if LOW was not 0)
digitalWrite(pin, state^= (HIGH^LOW));
void digitalWrite(uint8_t, uint8_t);int digitalRead(uint8_t);