     Serial.println("\n[isp_repair2]");
     blink();
 
-    digitalWrite(SCK, 1);
-    digitalWrite(MOSI, 1);
+    digitalWrite(PIN_SCK, 1);
+    digitalWrite(PIN_MOSI, 1);
     digitalWrite(RESET, 1);
   
-    pinMode(SCK, OUTPUT);
-    pinMode(MOSI, OUTPUT);
+    pinMode(PIN_SCK, OUTPUT);
+    pinMode(PIN_MOSI, OUTPUT);
     pinMode(RESET, OUTPUT);
   
     byte config = readConfig();

        }
    }

    pinMode(SCK, INPUT);
    pinMode(MOSI, INPUT);
    pinMode(RESET, INPUT);
    
    digitalWrite(SCK, 0);
    digitalWrite(MOSI, 0);
    digitalWrite(RESET, 0);
    
    delay(10); // let the serial port finish

static byte XferByte(byte v) {
    byte result = 0;
    for (byte i = 0; i < 8; ++i) {
        digitalWrite(PIN_MOSI, v & 0x80);
        digitalWrite(PIN_SCK, 0); // slow pulse, max 60KHz
        digitalWrite(PIN_SCK, 1);
        v <<= 1;
        result = (result << 1) | digitalRead(PIN_MISO);
    }
    return result;
}
