X-Git-Url: https://review.openocd.org/gitweb?p=openocd.git;a=blobdiff_plain;f=src%2Fxsvf%2Fxsvf.c;h=b9bf4146cf6f0fee02bcb84b504258d30d0759a9;hp=1c21e9290cb40e3a3bc847b89fe93d1aa00b9d74;hb=6d1d58a1fc3dfd60e9cac89460b5a6e438d11efa;hpb=50c086ffb94f199c088f4cc52b7887b668dddf00 diff --git a/src/xsvf/xsvf.c b/src/xsvf/xsvf.c index 1c21e9290c..b9bf4146cf 100644 --- a/src/xsvf/xsvf.c +++ b/src/xsvf/xsvf.c @@ -82,7 +82,7 @@ ! Set the maximum loop count to 25. LCOUNT 25; -! Step to DRPAUSE give 5 clocks and wait for 1.00e+000 SEC. +! Step to DRPAUSE give 5 clocks and wait for 1.00e + 000 SEC. LDELAY DRPAUSE 5 TCK 1.00E-003 SEC; ! Test for the completed status. Match means pass. ! Loop back to LDELAY line if not match and loop count less than 25. @@ -133,7 +133,7 @@ static tap_state_t xsvf_to_tap( int xsvf_state ) { tap_state_t ret; - switch( xsvf_state ) + switch ( xsvf_state ) { case XSV_RESET: ret = TAP_RESET; break; case XSV_IDLE: ret = TAP_IDLE; break; @@ -366,11 +366,11 @@ static int handle_xsvf_command(struct command_context_s *cmd_ctx, char *cmd, cha LOG_DEBUG("%s %d", op_name, xsdrsize); - for( attempt=0; attempt0 ) + if ( attempt > 0 ) { /* perform the XC9500 exception handling sequence shown in xapp067.pdf and illustrated in psuedo code at end of this file. We start from state @@ -605,7 +605,7 @@ static int handle_xsvf_command(struct command_context_s *cmd_ctx, char *cmd, cha LOG_DEBUG("XSIR2 %d", bitcount); } - ir_buf = malloc((bitcount+7) / 8); + ir_buf = malloc((bitcount + 7) / 8); if (xsvf_read_buffer(bitcount, xsvf_fd, ir_buf) != ERROR_OK) do_abort = 1; @@ -836,7 +836,7 @@ static int handle_xsvf_command(struct command_context_s *cmd_ctx, char *cmd, cha if (limit < 1) limit = 1; - for( attempt=0; attempt