- // tricky: RESET has a weak pull-up, and is wired to a CBUS line. So,
- // we can pull it down (assert reset) from uart-mode, or we can
- // let it float upward from either mode.
- private void resetPin(boolean on) throws IOException {
- ftdiuart.uart_and_cbus_mode(1<<1, on ? (1<<1) : 0);
- flush();
- if (on) {
- ftdiuart.dbus_mode(dmask);
- flush();
- }
- }
-
- private void releaseConPin() throws IOException {
- dmask &= ~(1<<0);
- ftdiuart.dbus_mode(dmask);
- flush();
- }
-
- private void conPin(boolean on) throws IOException {
- dmask |= (1<<0);
- ftdiuart.dbus_mode(dmask);
- setDBusLine(0, on);
- flush();
- }
-
- private void avrrstPin(boolean on) throws IOException { setDBusLine(7, on); }
- private void cclkPin(boolean on) throws IOException { setDBusLine(6, on); }
- private void configDataPin(boolean on) throws IOException { setDBusLine(5, on); }
- private boolean initPin() throws IOException { flush(); return (ftdiuart.readPins() & (1<<4))!=0; }
-