is there any way to check output pin state, e.g., to find out is it in HIGH or LOW state? I mean something like:
int outPin = 11;
pinMode(outPin, OUTPUT);
digitalWrite(outPin, state);
...
// don't have access to original state value, find out if the
// outPin is LOW or HIGH
state = ...; // ????