fixed warnings + added zy1000 jtag_add_clocks support.
authoroharboe <oharboe@b42882b7-edfa-0310-969c-e2dbd0fdcd60>
Fri, 9 Jan 2009 10:12:43 +0000 (10:12 +0000)
committeroharboe <oharboe@b42882b7-edfa-0310-969c-e2dbd0fdcd60>
Fri, 9 Jan 2009 10:12:43 +0000 (10:12 +0000)
git-svn-id: svn://svn.berlios.de/openocd/trunk@1309 b42882b7-edfa-0310-969c-e2dbd0fdcd60

src/ecosboard.c
src/jtag/jtag.c
src/jtag/zy1000.c

index 019eb0e853c3777a948157684baae91c6679e1d9..11b786cb882112dbd27035386306e8955822914f 100644 (file)
@@ -190,7 +190,7 @@ int zy1000_configuration_output_handler_log(struct command_context_s *context,
 }
 
 #ifdef CYGPKG_PROFILE_GPROF
-extern void start_profile();
+extern void start_profile(void);
 
 int eCosBoard_handle_eCosBoard_profile_command(struct command_context_s *cmd_ctx, char *cmd, char **args, int argc)
 {
@@ -201,13 +201,13 @@ int eCosBoard_handle_eCosBoard_profile_command(struct command_context_s *cmd_ctx
 
 #endif
 
-externC void phi_init_all_network_interfaces();
+externC void phi_init_all_network_interfaces(void);
 
 command_context_t *cmd_ctx;
 
 static bool webRunning = false;
 
-void keep_webserver()
+void keep_webserver(void)
 {
        // Target initialisation is only attempted at startup, so we sleep forever and
        // let the http server bail us out(i.e. get config files set up).
@@ -261,12 +261,12 @@ MTAB_ENTRY( romfs_mte1,
                (CYG_ADDRWORD) &filedata[0] );
 #endif
 
-void openocd_sleep_prelude()
+void openocd_sleep_prelude(void)
 {
        cyg_mutex_unlock(&httpstate.jim_lock);
 }
 
-void openocd_sleep_postlude()
+void openocd_sleep_postlude(void)
 {
        cyg_mutex_lock(&httpstate.jim_lock);
 }
@@ -422,7 +422,7 @@ static int zylinjtag_Jim_Command_reboot(Jim_Interp *interp, int argc,
 
 extern Jim_Interp *interp;
 
-static void zylinjtag_startNetwork()
+static void zylinjtag_startNetwork(void)
 {
        // Bring TCP/IP up immediately before we're ready to accept commands.
        //
@@ -857,7 +857,7 @@ bool logAllToSerial = false;
 int boolParam(char *var);
 
 
-command_context_t *setup_command_handler();
+command_context_t *setup_command_handler(void);
 
 extern const char *zylin_config_dir;
 
index a0cdf014ef66a925c833771637151a96d796b602..5ce998943588ce19b642b22991217d2719ceef1e 100644 (file)
@@ -969,7 +969,7 @@ void jtag_add_tlr(void)
                jtag_error=retval;
 }
 
-int MINIDRIVER(interface_jtag_add_tlr)()
+int MINIDRIVER(interface_jtag_add_tlr)(void)
 {
        enum tap_state state = TAP_RESET;
        jtag_command_t **last_cmd = jtag_get_last_command_p();
index 0b3c8525a6e56f98ebf3f7d221a56de32feea878..2c56191326a5af2ece954f385b6702fb0d24d552 100644 (file)
@@ -83,7 +83,7 @@ static int zy1000_speed_div(int speed, int *khz)
        return ERROR_OK;
 }
 
-static bool readPowerDropout()
+static bool readPowerDropout(void)
 {
        cyg_uint32 state;
        // sample and clear power dropout
@@ -95,7 +95,7 @@ static bool readPowerDropout()
 }
 
 
-static bool readSRST()
+static bool readSRST(void)
 {
        cyg_uint32 state;
        // sample and clear SRST sensing
@@ -152,7 +152,7 @@ int zy1000_read(void)
        return -1;
 }
 
-extern bool readSRST();
+extern bool readSRST(void);
 
 void zy1000_reset(int trst, int srst)
 {
@@ -404,7 +404,7 @@ int interface_jtag_execute_queue(void)
 
 
 
-static cyg_uint32 getShiftValue()
+static cyg_uint32 getShiftValue(void)
 {
        cyg_uint32 value;
        waitIdle();
@@ -413,7 +413,7 @@ static cyg_uint32 getShiftValue()
        return value;
 }
 #if 0
-static cyg_uint32 getShiftValueFlip()
+static cyg_uint32 getShiftValueFlip(void)
 {
        cyg_uint32 value;
        waitIdle();
@@ -438,7 +438,7 @@ static void shiftValueInnerFlip(const enum tap_state state, const enum tap_state
 
 extern int jtag_check_value(u8 *captured, void *priv);
 
-static void gotoEndState()
+static void gotoEndState(void)
 {
        setCurrentState(cmd_queue_end_state);
 }
@@ -693,10 +693,10 @@ int interface_jtag_add_reset(int req_trst, int req_srst)
        return ERROR_OK;
 }
 
-int interface_jtag_add_runtest(int num_cycles, enum tap_state state)
+static int zy1000_jtag_add_clocks(int num_cycles, enum tap_state state, enum tap_state clockstate)
 {
        /* num_cycles can be 0 */
-       setCurrentState(TAP_IDLE);
+       setCurrentState(clockstate);
 
        /* execute num_cycles, 32 at the time. */
        int i;
@@ -708,7 +708,7 @@ int interface_jtag_add_runtest(int num_cycles, enum tap_state state)
                {
                        num=num_cycles-i;
                }
-               shiftValueInner(TAP_IDLE, TAP_IDLE, num, 0);
+               shiftValueInner(clockstate, clockstate, num, 0);
        }
 
 #if !TEST_MANUAL()
@@ -734,6 +734,16 @@ int interface_jtag_add_runtest(int num_cycles, enum tap_state state)
        return ERROR_OK;
 }
 
+int interface_jtag_add_runtest(int num_cycles, enum tap_state state)
+{
+       return zy1000_jtag_add_clocks(num_cycles, state, TAP_IDLE);
+}
+
+int interface_jtag_add_clocks(int num_cycles)
+{
+       return zy1000_jtag_add_clocks(num_cycles, cmd_queue_cur_state, cmd_queue_end_state);
+}
+
 int interface_jtag_add_sleep(u32 us)
 {
        jtag_sleep(us);
@@ -843,3 +853,5 @@ int boolParam(char *var)
        free(name);
        return result;
 }
+
+

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)