   if (memtype == 'E') {
     result = (char)write_eeprom(length);
     if (CRC_EOP == getch()) {
-      Serial.print((char) STK_INSYNC);
-      Serial.print(result);
+      SERIAL.print((char) STK_INSYNC);
+      SERIAL.print(result);
     } else {
       error++;
-      Serial.print((char) STK_NOSYNC);
+      SERIAL.print((char) STK_NOSYNC);
     }
     return;
   }
-  Serial.print((char)STK_FAILED);
+  SERIAL.print((char)STK_FAILED);
   return;
 }
 

#define SPI_CLOCK_DIV_MAX	SPI_CLOCK_DIV_128

#endif

#define HWVER 2
#define SWMAJ 1

    // this is how we can get back in sync
    case CRC_EOP:
      error++;
      SERIAL.print((char) STK_NOSYNC);
      break;

    // anything else we will return STK_UNKNOWN
    default:
      error++;
      if (CRC_EOP == getch())
        SERIAL.print((char)STK_UNKNOWN);
      else
        SERIAL.print((char)STK_NOSYNC);
  }
}

