 }
 
 //
-char getstatus()
+char getstatus(char cmd)
 {
 //
-   char result = 0;
+   char result = cmd;
    for (int i = 0; i < pinc; i++)
       if (pineepromstate[i] == 1) result |= 1 << i;
    return result;

       if (pinreport[i] == 0 && pineepromstate[i]==1)
         {
      //
         server.write( getstatus() );
         pinreport[i] = 1;
         }
      }

const int TSTMODE = 16;
const int DORESET = 32;
const int GETSTAT = 64;

const unsigned long MAX_UNSIGNED_LONG = 4294967295;
const unsigned long TSTLEN = 5*60*1000;
unsigned long tstbgn = 0;
boolean iststmode = false;

//
EthernetServer server(2323);
