X-Git-Url: http://git.megacz.com/?p=slipway.git;a=blobdiff_plain;f=src%2Fedu%2Fberkeley%2Fslipway%2FFtdiBoard.java;h=283a6267b62ef22cba52b71f8e21931f0788c087;hp=dafc38f0734b82633dad076e9999d72a548017c9;hb=3212d3617ec8c1b2dce1e8a0991f196f03236ef9;hpb=c2fe2c6460fa3ad7b73ef431edf21cfb38a11b27 diff --git a/src/edu/berkeley/slipway/FtdiBoard.java b/src/edu/berkeley/slipway/FtdiBoard.java index dafc38f..283a626 100644 --- a/src/edu/berkeley/slipway/FtdiBoard.java +++ b/src/edu/berkeley/slipway/FtdiBoard.java @@ -56,37 +56,9 @@ public class FtdiBoard extends Board { if ((bytes % 1000)==0) { os.flush(); System.out.print("wrote " + bytes + " bytes\r"); - d.rcon(); } } - - d.flush(); - if (!d.initErr()) - throw new RuntimeException("initialization failed at " + bytes); - - for(int i=0; i<100; i++) { - d.flush(); - if (!d.initErr()) - throw new RuntimeException("initialization failed at " + bytes); - try { Thread.sleep(20); } catch (Exception e) { } - d.config(0,1); - } - - System.out.println(); - System.out.println("avr reset => false"); - d.avrrst(false); - try { Thread.sleep(500); } catch (Exception e) { } - //System.out.println("cts="+""+" pins=" + pad(Integer.toString(d.readPins()&0xff,2),8)); - - //((Chip)d).avr(); - - //System.out.println("avr reset => true"); - ((ChipImpl)chip).purge(); - ((ChipImpl)chip).uart_and_cbus_mode(1<<1, 1<<1); - - //d.avrrst(true); - //try { Thread.sleep(500); } catch (Exception e) { } - //System.out.println("cts="+""+" pins=" + pad(Integer.toString(d.readPins()&0xff,2),8)); + os.close(); } public static String pad(String s, int i) {