David Brownell <david-b@pacbell.net>:
[openocd.git] / src / jtag / presto.c
index 3bac4a9553b7b2b57f19b3a71a8d19fe534459a2..125658be5b8a6977656399c8b521215c91b961a9 100644 (file)
@@ -117,7 +117,7 @@ typedef struct presto_s
        int jtag_tdi_count;
 
        int jtag_speed;
-       
+
 } presto_t;
 
 static presto_t presto_state;
@@ -420,7 +420,7 @@ static int presto_open(char *req_serial)
        presto->jtag_tdi_count=0;
 
        presto->jtag_speed=0;
-       
+
 #if BUILD_PRESTO_FTD2XX == 1
        return presto_open_ftd2xx(req_serial);
 #elif BUILD_PRESTO_LIBFTDI == 1
@@ -575,7 +575,7 @@ static int presto_tdi_flush(void)
        presto_sendbyte(presto->jtag_tdi_data);
        presto->jtag_tdi_count = 0;
        presto->jtag_tdi_data = 0;
-       
+
        return 0;
 }
 
@@ -586,7 +586,7 @@ static int presto_tck_idle(void)
                presto_sendbyte(0xCA);
                presto->jtag_tck = 0;
        }
-       
+
        return 0;
 }
 
@@ -711,7 +711,7 @@ static int presto_jtag_khz(int khz, int *jtag_speed)
 
        if (khz >= 3000) *jtag_speed = 0;
        else *jtag_speed = (1000+khz-1)/khz;
-       
+
        return 0;
 }
 
@@ -725,26 +725,26 @@ static int presto_jtag_speed_div(int speed, int *khz)
 
        if (speed == 0) *khz = 3000;
        else *khz = 1000/speed;
-       
+
        return 0;
 }
 
 static int presto_jtag_speed(int speed)
 {
        int khz;
-       
+
        if (presto_jtag_speed_div(speed, &khz))
        {
                return ERROR_INVALID_ARGUMENTS;
        }
 
        presto->jtag_speed = speed;
-       
+
        if (khz%1000 == 0)
                LOG_INFO("setting speed to %d, max. TCK freq. is %d MHz", speed, khz/1000);
        else
                LOG_INFO("setting speed to %d, max. TCK freq. is %d kHz", speed, khz);
-       
+
        return 0;
 }
 
@@ -787,7 +787,7 @@ static int presto_jtag_init(void)
        LOG_INFO("PRESTO open, serial number '%s'", presto->serial);
 
        /* use JTAG speed setting from configuration file */
-       presto_jtag_speed(jtag_speed);
+       presto_jtag_speed(jtag_get_speed());
 
        bitq_interface = &presto_bitq;
        return ERROR_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)