David Brownell <david-b@pacbell.net>:
authorzwelch <zwelch@b42882b7-edfa-0310-969c-e2dbd0fdcd60>
Thu, 4 Jun 2009 01:16:43 +0000 (01:16 +0000)
committerzwelch <zwelch@b42882b7-edfa-0310-969c-e2dbd0fdcd60>
Thu, 4 Jun 2009 01:16:43 +0000 (01:16 +0000)
Minor cleanup of FT2232:
  - make Olimex glue warn about Olimex issues instead of JTAGkey issues;
  - make some data static+const;
  - don't export some internal symbols.

git-svn-id: svn://svn.berlios.de/openocd/trunk@2037 b42882b7-edfa-0310-969c-e2dbd0fdcd60

src/jtag/ft2232.c

index 95a28117090cf492763b996021664686a7582605..9722988d99881cf128a3d3ac87b693c47a1680a2 100644 (file)
@@ -148,7 +148,7 @@ static void olimex_jtag_blink(void);
 static void flyswatter_jtag_blink(void);
 static void turtle_jtag_blink(void);
 
-ft2232_layout_t  ft2232_layouts[] =
+static const ft2232_layout_t  ft2232_layouts[] =
 {
        { "usbjtag",              usbjtag_init,              usbjtag_reset,      NULL                    },
        { "jtagkey",              jtagkey_init,              jtagkey_reset,      NULL                    },
@@ -170,7 +170,7 @@ ft2232_layout_t  ft2232_layouts[] =
 
 static u8                  nTRST, nTRSTnOE, nSRST, nSRSTnOE;
 
-static ft2232_layout_t*    layout;
+static const ft2232_layout_t *layout;
 static u8                  low_output     = 0x0;
 static u8                  low_direction  = 0x0;
 static u8                  high_output    = 0x0;
@@ -558,7 +558,7 @@ static int ft2232_register_commands(struct command_context_s* cmd_ctx)
 }
 
 
-void ft2232_end_state(tap_state_t state)
+static void ft2232_end_state(tap_state_t state)
 {
        if (tap_is_state_stable(state))
                tap_set_end_state(state);
@@ -775,7 +775,7 @@ static void ft2232_add_pathmove( tap_state_t* path, int num_states )
 }
 
 
-void ft2232_add_scan(bool ir_scan, enum scan_type type, u8* buffer, int scan_size)
+static void ft2232_add_scan(bool ir_scan, enum scan_type type, u8* buffer, int scan_size)
 {
        int num_bytes = (scan_size + 7) / 8;
        int bits_left = scan_size;
@@ -2032,7 +2032,7 @@ static int ft2232_init(void)
        u8  buf[1];
        int retval;
        u32 bytes_written;
-       ft2232_layout_t* cur_layout = ft2232_layouts;
+       const ft2232_layout_t* cur_layout = ft2232_layouts;
        int i;
 
        if (tap_get_tms_path_len(TAP_IRPAUSE,TAP_IRPAUSE)==7)
@@ -2361,7 +2361,7 @@ static int olimex_jtag_init(void)
 
        if ( ( ( ft2232_write(buf, 3, &bytes_written) ) != ERROR_OK ) || (bytes_written != 3) )
        {
-               LOG_ERROR("couldn't initialize FT2232 with 'JTAGkey' layout");
+               LOG_ERROR("couldn't initialize FT2232 with 'Olimex' layout");
                return ERROR_JTAG_INIT_FAILED;
        }
 
@@ -2402,9 +2402,9 @@ static int olimex_jtag_init(void)
        buf[2] = high_direction;    /* all outputs (xRST and xRSTnOE) */
        LOG_DEBUG("%2.2x %2.2x %2.2x", buf[0], buf[1], buf[2]);
 
-       if ( ( ( ft2232_write(buf, 3, &bytes_written) ) != ERROR_OK ) || (bytes_written != 3) )
+       if ((ft2232_write(buf, 3, &bytes_written) != ERROR_OK) || (bytes_written != 3))
        {
-               LOG_ERROR("couldn't initialize FT2232 with 'JTAGkey' layout");
+               LOG_ERROR("couldn't initialize FT2232 with 'Olimex' layout");
                return ERROR_JTAG_INIT_FAILED;
        }
 

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)