]> git.sur5r.net Git - openocd/commitdiff
Zach Welch <zw@superlucidity.net> use tap_state_t
authoroharboe <oharboe@b42882b7-edfa-0310-969c-e2dbd0fdcd60>
Sun, 19 Apr 2009 08:05:54 +0000 (08:05 +0000)
committeroharboe <oharboe@b42882b7-edfa-0310-969c-e2dbd0fdcd60>
Sun, 19 Apr 2009 08:05:54 +0000 (08:05 +0000)
git-svn-id: svn://svn.berlios.de/openocd/trunk@1464 b42882b7-edfa-0310-969c-e2dbd0fdcd60

src/jtag/amt_jtagaccel.c
src/jtag/dummy.c
src/jtag/gw16012.c
src/jtag/jtag.c

index 54523fb3e773a31ea3e6ff1225c0c60ec74d18a5..5e0ec492327d8022372eed808153b7d82fdb1e43 100644 (file)
@@ -156,7 +156,7 @@ int amt_jtagaccel_speed(int speed)
        return ERROR_OK;
 }
 
-void amt_jtagaccel_end_state(int state)
+void amt_jtagaccel_end_state(tap_state_t state)
 {
        if (tap_is_state_stable(state))
                tap_set_end_state(state);
index 0a64c214a49e662429ae385245a7857c3893aaec..7228ab5a05b86ef67d4f72b52463ec64f59b4ffe 100644 (file)
@@ -91,7 +91,7 @@ void dummy_write(int tck, int tms, int tdi)
        {\r
                if( tck )\r
                {\r
-                       int old_state = dummy_state;\r
+                       tap_state_t old_state = dummy_state;\r
                        dummy_state = tap_state_transition( old_state, tms );\r
 \r
                        if( old_state != dummy_state )\r
index af5776755d4e211c0c452fb1ca8ef8ac6d17d01f..d9d5680cde6435f4946bc826169714aae669ef47 100644 (file)
@@ -194,7 +194,7 @@ int gw16012_speed(int speed)
        return ERROR_OK;
 }
 
-void gw16012_end_state(int state)
+void gw16012_end_state(tap_state_t state)
 {
        if (tap_is_state_stable(state))
                tap_set_end_state(state);
index 2f6ab776a7b5cff68258422f438e39c3d9749c55..a9a4b30cbb21c090adaffa6da235b4665627f2cb 100644 (file)
@@ -219,7 +219,7 @@ void jtag_add_runtest(int num_cycles, tap_state_t endstate);
 void jtag_add_end_state(tap_state_t endstate);
 void jtag_add_sleep(u32 us);
 int jtag_execute_queue(void);
-int tap_state_by_name(const char *name);
+tap_state_t tap_state_by_name(const char *name);
 
 /* jtag commands */
 int handle_interface_command(struct command_context_s *cmd_ctx, char *cmd, char **args, int argc);
@@ -2652,7 +2652,7 @@ int handle_jtag_khz_command(struct command_context_s *cmd_ctx, char *cmd, char *
 
 int handle_endstate_command(struct command_context_s *cmd_ctx, char *cmd, char **args, int argc)
 {
-       int state;
+       tap_state_t state;
 
        if (argc < 1)
        {
@@ -2665,7 +2665,7 @@ int handle_endstate_command(struct command_context_s *cmd_ctx, char *cmd, char *
                        command_print( cmd_ctx, "Invalid state name: %s\n", args[0] );
                        return ERROR_COMMAND_SYNTAX_ERROR;
                }
-               jtag_add_end_state( (tap_state_t)(state));
+               jtag_add_end_state(state);
                jtag_execute_queue();
        }
        command_print(cmd_ctx, "current endstate: %s", tap_state_name(cmd_queue_end_state));
@@ -2729,7 +2729,7 @@ int handle_irscan_command(struct command_context_s *cmd_ctx, char *cmd, char **a
        int i;
        scan_field_t *fields;
        jtag_tap_t *tap;
-       int endstate;
+       tap_state_t endstate;
 
        if ((argc < 2) || (argc % 2))
        {
@@ -2807,7 +2807,7 @@ int Jim_Command_drscan(Jim_Interp *interp, int argc, Jim_Obj *const *args)
        int field_count = 0;
        int i, e;
        jtag_tap_t *tap;
-       int endstate;
+       tap_state_t endstate;
 
        /* args[1] = device
         * args[2] = num_bits
@@ -3269,9 +3269,9 @@ const char* tap_state_name(tap_state_t state)
        return ret;
 }
 
-int tap_state_by_name( const char *name )
+tap_state_t tap_state_by_name( const char *name )
 {
-       int x;
+       tap_state_t x;
 
        for( x = 0 ; x < TAP_NUM_STATES ; x++ ){
                /* be nice to the human */