}
}
- protected static int dmask =
+ protected int dmask =
//(1<<0) |
(1<<1) |
(1<<2) |
uart();
}
public void avrrst(boolean on) { dbang(7, on); }
- public boolean initErr() { return (readPins() & (1<<4))!=0; }
public void clk(boolean on) { dbang(6, on); }
public void data(boolean on) { dbang(5, on); }
+ public boolean initErr() { return (readPins() & (1<<4))!=0; }
public boolean con() {
dmask &= ~(1<<0);
dbangmode(dmask);
dbangmode(dmask);
dbang(0, on);
}
-
}
chip.porte(4, true);
boot(new InputStreamReader(new FileInputStream("bitstreams/usbdrone.bst")));
- System.out.println(" pins: " + pad(Integer.toString(chip.readPins()&0xff,2),8));
- in = new BufferedInputStream(chip.getInputStream());
- out = new BufferedOutputStream(chip.getOutputStream());
+ in = chip.getInputStream();
+ out = chip.getOutputStream();
for(int i=0; i<255; i++) out.write(0);
out.flush();
}
if (!d.initErr())
throw new RuntimeException("initialization failed at " + bytes);
try { Thread.sleep(20); } catch (Exception e) { }
- System.out.print("cts="+""+" pins=" + pad(Integer.toString(d.readPins()&0xff,2),8)+" \r");
d.config(0,1);
}