- Fixes '[<>]' whitespace
[openocd.git] / src / jtag / tcl.c
index 88f335a6b5536d88a9bb5fa2bad397ea28c1c31e..a6f7b5dd4725f15beaaa94451d307811fbdc882f 100644 (file)
@@ -532,7 +532,7 @@ static int jim_jtag_command( Jim_Interp *interp, int argc, Jim_Obj *const *argv
 
        context = Jim_GetAssocData(interp, "context");
        /* go past the command */
-       Jim_GetOpt_Setup( &goi, interp, argc-1, argv+1 );
+       Jim_GetOpt_Setup( &goi, interp, argc-1, argv + 1 );
 
        e = Jim_GetOpt_Nvp( &goi, jtag_cmds, &n );
        if ( e != JIM_OK ){
@@ -699,11 +699,11 @@ int jtag_register_commands(struct command_context_s *cmd_ctx)
        register_jim(cmd_ctx, "pathmove", Jim_Command_pathmove, "move JTAG to state1 then to state2, state3, etc. <state1>,<state2>,<stat3>...");
 
        register_command(cmd_ctx, NULL, "verify_ircapture", handle_verify_ircapture_command,
-               COMMAND_ANY, "verify value captured during Capture-IR <enable|disable>");
+               COMMAND_ANY, "verify value captured during Capture-IR <enable | disable>");
        register_command(cmd_ctx, NULL, "verify_jtag", handle_verify_jtag_command,
-               COMMAND_ANY, "verify value capture <enable|disable>");
+               COMMAND_ANY, "verify value capture <enable | disable>");
        register_command(cmd_ctx, NULL, "tms_sequence", handle_tms_sequence_command,
-               COMMAND_ANY, "choose short(default) or long tms_sequence <short|long>");
+               COMMAND_ANY, "choose short(default) or long tms_sequence <short | long>");
        return ERROR_OK;
 }
 
@@ -721,13 +721,13 @@ static int default_speed_div(int speed, int *khz)
 
 static int default_power_dropout(int *dropout)
 {
-       *dropout=0; /* by default we can't detect power dropout */
+       *dropout = 0; /* by default we can't detect power dropout */
        return ERROR_OK;
 }
 
 static int default_srst_asserted(int *srst_asserted)
 {
-       *srst_asserted=0; /* by default we can't detect srst asserted */
+       *srst_asserted = 0; /* by default we can't detect srst asserted */
        return ERROR_OK;
 }
 
@@ -1286,7 +1286,7 @@ static int Jim_Command_drscan(Jim_Interp *interp, int argc, Jim_Obj *const *args
                }
 
                /* Not valid.. are we at the end? */
-               if ( ((i+2) != argc) ){
+               if ( ((i + 2) != argc) ){
                        /* nope, then error */
                        return e;
                }
@@ -1301,7 +1301,7 @@ static int Jim_Command_drscan(Jim_Interp *interp, int argc, Jim_Obj *const *args
                /* is it the magic? */
                if ( 0 == strcmp( "-endstate", cp ) ){
                        /* is the statename valid? */
-                       cp = Jim_GetString( args[i+1], NULL );
+                       cp = Jim_GetString( args[i + 1], NULL );
 
                        /* see if it is a valid state name */
                        endstate = tap_state_by_name(cp);
@@ -1331,7 +1331,7 @@ static int Jim_Command_drscan(Jim_Interp *interp, int argc, Jim_Obj *const *args
                return JIM_ERR;
        }
 
-       num_fields=(argc-2)/2;
+       num_fields = (argc-2)/2;
        fields = malloc(sizeof(scan_field_t) * num_fields);
        for (i = 2; i < argc; i += 2)
        {
@@ -1340,7 +1340,7 @@ static int Jim_Command_drscan(Jim_Interp *interp, int argc, Jim_Obj *const *args
                const char *str;
 
                Jim_GetLong(interp, args[i], &bits);
-               str = Jim_GetString(args[i+1], &len);
+               str = Jim_GetString(args[i + 1], &len);
 
                fields[field_count].tap = tap;
                fields[field_count].num_bits = bits;
@@ -1359,7 +1359,7 @@ static int Jim_Command_drscan(Jim_Interp *interp, int argc, Jim_Obj *const *args
                return JIM_ERR;
        }
 
-       field_count=0;
+       field_count = 0;
        Jim_Obj *list = Jim_NewListObj(interp, NULL, 0);
        for (i = 2; i < argc; i += 2)
        {
@@ -1387,7 +1387,7 @@ static int Jim_Command_pathmove(Jim_Interp *interp, int argc, Jim_Obj *const *ar
 {
        tap_state_t states[8];
 
-       if ((argc < 2) || ((size_t)argc > (sizeof(states)/sizeof(*states)+1)))
+       if ((argc < 2) || ((size_t)argc > (sizeof(states)/sizeof(*states) + 1)))
        {
                Jim_WrongNumArgs(interp, 1, args, "wrong arguments");
                return JIM_ERR;
@@ -1396,10 +1396,10 @@ static int Jim_Command_pathmove(Jim_Interp *interp, int argc, Jim_Obj *const *ar
        script_debug(interp, "pathmove", argc, args);
 
        int i;
-       for (i=0; i<argc-1; i++)
+       for (i = 0; i < argc-1; i++)
        {
                const char *cp;
-               cp = Jim_GetString( args[i+1], NULL );
+               cp = Jim_GetString( args[i + 1], NULL );
                states[i] = tap_state_by_name(cp);
                if ( states[i] < 0 )
                {
@@ -1415,7 +1415,7 @@ static int Jim_Command_pathmove(Jim_Interp *interp, int argc, Jim_Obj *const *ar
                return JIM_ERR;
        }
 
-       jtag_add_pathmove(argc-2, states+1);
+       jtag_add_pathmove(argc-2, states + 1);
 
        if (jtag_execute_queue()!= 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)