From: adam Date: Wed, 20 Sep 2006 13:21:40 +0000 (+0100) Subject: checkpoint X-Git-Tag: mpar_demo_release~60 X-Git-Url: http://git.megacz.com/?p=slipway.git;a=commitdiff_plain;h=c2fe2c6460fa3ad7b73ef431edf21cfb38a11b27 checkpoint --- diff --git a/src/com/atmel/fpslic/Chip.java b/src/com/atmel/fpslic/Chip.java index ae77448..57c9d98 100644 --- a/src/com/atmel/fpslic/Chip.java +++ b/src/com/atmel/fpslic/Chip.java @@ -21,5 +21,6 @@ public interface Chip { public InputStream getInputStream(); public OutputStream getOutputStream(); public void selfTest() throws Exception; + public OutputStream getConfigStream() throws IOException; } diff --git a/src/com/atmel/fpslic/ChipImpl.java b/src/com/atmel/fpslic/ChipImpl.java index 9123f15..e11b8f4 100644 --- a/src/com/atmel/fpslic/ChipImpl.java +++ b/src/com/atmel/fpslic/ChipImpl.java @@ -115,6 +115,26 @@ public class ChipImpl extends FtdiUart implements Chip { dbus_mode(dmask); } + public OutputStream getConfigStream() throws IOException { + doReset(); + config(0,10); + con(); + return new OutputStream() { + public void write(int in) throws IOException { + for(int i=7; i>=0; i--) { + config((((in & 0xff) & (1<