checkpoint
authoradam <adam@megacz.com>
Mon, 11 Sep 2006 13:39:30 +0000 (14:39 +0100)
committeradam <adam@megacz.com>
Mon, 11 Sep 2006 13:39:30 +0000 (14:39 +0100)
src/edu/berkeley/obits/device/atmel/ChipImpl.java
src/edu/berkeley/obits/device/atmel/FtdiChip.java

index 5cb10ec..df0e97e 100644 (file)
@@ -16,6 +16,7 @@ public class ChipImpl extends FtdiChip implements Chip {
 
         con(false);
         flush();
+
         buffered(false);
         reset(false);
         //avrrst(false);
index 20f4a2a..fd96c64 100644 (file)
@@ -27,11 +27,8 @@ public class FtdiChip {
     ByteArrayOutputStream baos = new ByteArrayOutputStream();
     public void flush() {
         try {
-            byte[] bytes = baos.toByteArray();
-            baos = new ByteArrayOutputStream();
-            out.write(bytes, 0, bytes.length);
-            out.flush();
-        } catch (IOException e) { throw new RuntimeException(e); }
+            getOutputStream().flush();
+        } catch (Exception e) { throw new RuntimeException(e); }
     }
 
     protected static int mask =