- allow building for MinGW using either -mno-cygwin or the MinGW gcc
[openocd.git] / src / jtag / ftd2xx.c
index e8d29a88ad8c92a0c9b9ef2064e7b1602f268c51..050f9c04d9c01d48885bc55db87449807e6bf05b 100644 (file)
@@ -799,6 +799,8 @@ int ftd2xx_init(void)
        u8 latency_timer;
        FT_STATUS status;
        DWORD num_devices;
        u8 latency_timer;
        FT_STATUS status;
        DWORD num_devices;
+       u8 buf[1];
+       DWORD bytes_written;
        
        ftd2xx_layout_t *cur_layout = ftd2xx_layouts;
        
        
        ftd2xx_layout_t *cur_layout = ftd2xx_layouts;
        
@@ -900,6 +902,13 @@ int ftd2xx_init(void)
                return ERROR_JTAG_INIT_FAILED;
 
        ftd2xx_speed(jtag_speed);
                return ERROR_JTAG_INIT_FAILED;
 
        ftd2xx_speed(jtag_speed);
+
+       buf[0] = 0x85; /* Disconnect TDI/DO to TDO/DI for Loopback */
+       if (((status = FT_Write(ftdih, buf, 1, &bytes_written)) != FT_OK) || (bytes_written != 1))
+       {
+               ERROR("couldn't write to ftdi device: %i", status);
+               return ERROR_JTAG_INIT_FAILED;
+       }
        
        if ((status = FT_Purge(ftdih, FT_PURGE_RX | FT_PURGE_TX)) != FT_OK)
        {
        
        if ((status = FT_Purge(ftdih, FT_PURGE_RX | FT_PURGE_TX)) != FT_OK)
        {

Linking to existing account procedure

If you already have an account and want to add another login method you MUST first sign in with your existing account and then change URL to read https://review.openocd.org/login/?link to get to this page again but this time it'll work for linking. Thank you.

SSH host keys fingerprints

1024 SHA256:YKx8b7u5ZWdcbp7/4AeXNaqElP49m6QrwfXaqQGJAOk gerrit-code-review@openocd.zylin.com (DSA)
384 SHA256:jHIbSQa4REvwCFG4cq5LBlBLxmxSqelQPem/EXIrxjk gerrit-code-review@openocd.org (ECDSA)
521 SHA256:UAOPYkU9Fjtcao0Ul/Rrlnj/OsQvt+pgdYSZ4jOYdgs gerrit-code-review@openocd.org (ECDSA)
256 SHA256:A13M5QlnozFOvTllybRZH6vm7iSt0XLxbA48yfc2yfY gerrit-code-review@openocd.org (ECDSA)
256 SHA256:spYMBqEYoAOtK7yZBrcwE8ZpYt6b68Cfh9yEVetvbXg gerrit-code-review@openocd.org (ED25519)
+--[ED25519 256]--+
|=..              |
|+o..   .         |
|*.o   . .        |
|+B . . .         |
|Bo. = o S        |
|Oo.+ + =         |
|oB=.* = . o      |
| =+=.+   + E     |
|. .=o   . o      |
+----[SHA256]-----+
2048 SHA256:0Onrb7/PHjpo6iVZ7xQX2riKN83FJ3KGU0TvI0TaFG4 gerrit-code-review@openocd.zylin.com (RSA)