Eliminate MixedCaps symbol from public JTAG TAP API:
[openocd.git] / src / jtag / jtag.c
index a31bb6eea02299cf4d42183d7cad0c07ce8aa406..e9d21d4539e3b4ed792914f4ae6777749a799a50 100644 (file)
@@ -66,9 +66,9 @@ int jtag_srst = 0;
 /**
  * List all TAPs that have been created.
  */
-static jtag_tap_t *jtag_all_taps = NULL;
+static jtag_tap_t *__jtag_all_taps = NULL;
 /**
- * The number of TAPs in the jtag_all_taps list, used to track the
+ * The number of TAPs in the __jtag_all_taps list, used to track the
  * assigned chain position to new TAPs
  */
 static int jtag_num_taps = 0;
@@ -236,23 +236,23 @@ static int handle_verify_ircapture_command(struct command_context_s *cmd_ctx, ch
 static int handle_verify_jtag_command(struct command_context_s *cmd_ctx, char *cmd, char **args, int argc);
 static int handle_tms_sequence_command(struct command_context_s *cmd_ctx, char *cmd, char **args, int argc);
 
-jtag_tap_t *jtag_AllTaps(void)
+jtag_tap_t *jtag_all_taps(void)
 {
-       return jtag_all_taps;
+       return __jtag_all_taps;
 };
 
-int jtag_NumTotalTaps(void)
+int jtag_tap_count(void)
 {
        return jtag_num_taps;
 }
 
-int jtag_NumEnabledTaps(void)
+int jtag_tap_count_enabled(void)
 {
        jtag_tap_t *t;
        int n;
 
        n = 0;
-       t = jtag_AllTaps();
+       t = jtag_all_taps();
        while(t){
                if( t->enabled ){
                        n++;
@@ -267,18 +267,18 @@ static void jtag_tap_add(struct jtag_tap_s *t)
 {
        t->abs_chain_position = jtag_num_taps++;
 
-       jtag_tap_t **tap = &jtag_all_taps;
+       jtag_tap_t **tap = &__jtag_all_taps;
        while(*tap != NULL)
                tap = &(*tap)->next_tap;
        *tap = t;
 }
 
-jtag_tap_t *jtag_TapByString( const char *s )
+jtag_tap_t *jtag_tap_by_string( const char *s )
 {
        jtag_tap_t *t;
        char *cp;
 
-       t = jtag_AllTaps();
+       t = jtag_all_taps();
        /* try name first */
        while(t){
                if( 0 == strcmp( t->dotted_name, s ) ){
@@ -294,13 +294,13 @@ jtag_tap_t *jtag_TapByString( const char *s )
                n = strtol( s, &cp, 0 );
                if( (s != cp) && (*cp == 0) ){
                        /* Then it is... */
-                       t = jtag_TapByAbsPosition(n);
+                       t = jtag_tap_by_abs_position(n);
                }
        }
        return t;
 }
 
-jtag_tap_t * jtag_TapByJimObj( Jim_Interp *interp, Jim_Obj *o )
+jtag_tap_t * jtag_tap_by_jim_obj( Jim_Interp *interp, Jim_Obj *o )
 {
        jtag_tap_t *t;
        const char *cp;
@@ -310,7 +310,7 @@ jtag_tap_t * jtag_TapByJimObj( Jim_Interp *interp, Jim_Obj *o )
                cp = "(unknown)";
                t = NULL;
        }  else {
-               t = jtag_TapByString( cp );
+               t = jtag_tap_by_string( cp );
        }
        if( t == NULL ){
                Jim_SetResult_sprintf(interp,"Tap: %s is unknown", cp );
@@ -319,13 +319,13 @@ jtag_tap_t * jtag_TapByJimObj( Jim_Interp *interp, Jim_Obj *o )
 }
 
 /* returns a pointer to the n-th device in the scan chain */
-jtag_tap_t * jtag_TapByAbsPosition( int n )
+jtag_tap_t * jtag_tap_by_abs_position( int n )
 {
        int orig_n;
        jtag_tap_t *t;
 
        orig_n = n;
-       t = jtag_AllTaps();
+       t = jtag_all_taps();
 
        while( t && (n > 0)) {
                n--;
@@ -1100,10 +1100,10 @@ static int jtag_examine_chain(void)
        }
 
        /* see if number of discovered devices matches configuration */
-       if (device_count != jtag_NumEnabledTaps())
+       if (device_count != jtag_tap_count_enabled())
        {
                LOG_ERROR("number of discovered devices in JTAG chain (%i) doesn't match (enabled) configuration (%i), total taps: %d",
-                                 device_count, jtag_NumEnabledTaps(), jtag_NumTotalTaps());
+                                 device_count, jtag_tap_count_enabled(), jtag_tap_count());
                LOG_ERROR("check the config file and ensure proper JTAG communication (connections, speed, ...)");
                return ERROR_JTAG_INIT_FAILED;
        }
@@ -1535,7 +1535,7 @@ static int jim_jtag_command( Jim_Interp *interp, int argc, Jim_Obj *const *argv
 
                {
                        jtag_tap_t *t;
-                       t = jtag_TapByJimObj( goi.interp, goi.argv[0] );
+                       t = jtag_tap_by_jim_obj( goi.interp, goi.argv[0] );
                        if( t == NULL ){
                                return JIM_ERR;
                        }
@@ -1569,7 +1569,7 @@ static int jim_jtag_command( Jim_Interp *interp, int argc, Jim_Obj *const *argv
                        jtag_tap_t *t;
 
                        Jim_GetOpt_Obj(&goi, &o);
-                       t = jtag_TapByJimObj( goi.interp, o );
+                       t = jtag_tap_by_jim_obj( goi.interp, o );
                        if( t == NULL ){
                                return JIM_ERR;
                        }
@@ -1589,7 +1589,7 @@ static int jim_jtag_command( Jim_Interp *interp, int argc, Jim_Obj *const *argv
                        jtag_tap_t *t;
 
                        Jim_GetOpt_Obj(&goi, &o);
-                       t = jtag_TapByJimObj( goi.interp, o );
+                       t = jtag_tap_by_jim_obj( goi.interp, o );
                        if( t == NULL ){
                                return JIM_ERR;
                        }
@@ -1898,9 +1898,9 @@ static int handle_jtag_device_command(struct command_context_s *cmd_ctx, char *c
 
        newargs[0] = Jim_NewStringObj( interp, "jtag", -1   );
        newargs[1] = Jim_NewStringObj( interp, "newtap", -1 );
-       sprintf( buf, "chip%d", jtag_NumTotalTaps() );
+       sprintf( buf, "chip%d", jtag_tap_count() );
        newargs[2] = Jim_NewStringObj( interp, buf, -1 );
-       sprintf( buf, "tap%d", jtag_NumTotalTaps() );
+       sprintf( buf, "tap%d", jtag_tap_count() );
        newargs[3] = Jim_NewStringObj( interp, buf, -1  );
        newargs[4] = Jim_NewStringObj( interp, "-irlen", -1  );
        newargs[5] = Jim_NewStringObj( interp, args[0], -1  );
@@ -1933,7 +1933,7 @@ static int handle_scan_chain_command(struct command_context_s *cmd_ctx, char *cm
 {
        jtag_tap_t *tap;
 
-       tap = jtag_AllTaps();
+       tap = jtag_all_taps();
        command_print(cmd_ctx, "     TapName            | Enabled |   IdCode      Expected    IrLen IrCap  IrMask Instr     ");
        command_print(cmd_ctx, "---|--------------------|---------|------------|------------|------|------|------|---------");
 
@@ -2326,7 +2326,7 @@ static int handle_irscan_command(struct command_context_s *cmd_ctx, char *cmd, c
 
        for (i = 0; i < num_fields; i++)
        {
-               tap = jtag_TapByString( args[i*2] );
+               tap = jtag_tap_by_string( args[i*2] );
                if (tap==NULL)
                {
                        command_print( cmd_ctx, "Tap: %s unknown", args[i*2] );
@@ -2434,7 +2434,7 @@ static int Jim_Command_drscan(Jim_Interp *interp, int argc, Jim_Obj *const *args
                }
        } /* validate args */
 
-       tap = jtag_TapByJimObj( interp, args[1] );
+       tap = jtag_tap_by_jim_obj( interp, args[1] );
        if( tap == NULL ){
                return JIM_ERR;
        }

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)