X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;ds=sidebyside;f=src%2Fcom%2Fatmel%2Ffpslic%2FFpslicRawUsb.java;fp=src%2Fcom%2Fatmel%2Ffpslic%2FFpslicRawUsb.java;h=0000000000000000000000000000000000000000;hb=6e3baea580262d8ec8074350dfcc3308286ae669;hp=d6fddeeac4348d8835a4b1c1a7412dae5c183869;hpb=d44022802297d495dfb0de032251f62d0021a1f6;p=slipway.git diff --git a/src/com/atmel/fpslic/FpslicRawUsb.java b/src/com/atmel/fpslic/FpslicRawUsb.java deleted file mode 100644 index d6fddee..0000000 --- a/src/com/atmel/fpslic/FpslicRawUsb.java +++ /dev/null @@ -1,143 +0,0 @@ -package com.atmel.fpslic; -import com.ftdi.usb.*; -import java.io.*; - -/** - * Exposes the FpslicRaw interface of an FPSLIC wired to an FTDI USB-UART. - */ -public class FpslicRawUsb implements FpslicRaw { - - private FpslicPins pins; - - public FpslicRawUsb(FtdiUart ftdiuart) throws IOException { - this.pins = new FpslicPinsUsb(ftdiuart); - reset(); - } - - public void reset() throws IOException { - - pins.avrrstPin(false); - pins.configDataPin(false); - pins.resetPin(false); - pins.cclkPin(false); - - pins.conPin(false); - pins.flush(); - - pins.resetPin(false); - try { Thread.sleep(500); } catch (Exception e) { } - if (pins.initPin()) throw new RuntimeException("INIT was still high after pulling RESET low"); - - pins.resetPin(true); - try { Thread.sleep(500); } catch (Exception e) { } - if (!pins.initPin()) throw new RuntimeException("INIT was still low after releasing RESET"); - - sendConfigBits(0,2); - pins.flush(); - } - - public OutputStream getConfigStream() throws IOException { - reset(); - return new OutputStream() { - int bytes = 0; - int bits = 0; - public void write(int in) throws IOException { - for(int i=7; i>=0; i--) { - bits++; - sendConfigBits((((in & 0xff) & (1<=0; i--) { - boolean bit = (dat & (1<