(1<<5) |
(1<<6) |
(1<<7);
- avrrst(false);
-
- flush();
- //purge();
-
ftdiuart.dbus_mode(dmask);
- flush();
+ avrrst(false);
clk(false);
data(false);
con(false);
- flush();
- //try { Thread.sleep(500); } catch (Exception e) { }
reset(false);
flush();
boolean bit = (dat & (1<<i)) != 0;
data(bit);
clk(true);
- clk(false);
+ dbits &= ~(1<<6); // let the clock fall with the next data bit, whenever it goes out
}
}
FtdiUartNative.ftdi_set_bitmode(context, (short)dbus_mask, (short)0x01);
}
+ public synchronized void setBitRate(int bitRate) throws IOException {
+ FtdiUartNative.ftdi_set_baudrate(context, bitRate);
+ }
+
/** returns the instantaneous value present on the DBUS pins */
public synchronized int readPins() throws IOException {
getOutputStream().flush();