summaryrefslogtreecommitdiff
path: root/src/jtag
diff options
context:
space:
mode:
authorzwelch <zwelch@b42882b7-edfa-0310-969c-e2dbd0fdcd60>2009-06-23 22:38:12 +0000
committerzwelch <zwelch@b42882b7-edfa-0310-969c-e2dbd0fdcd60>2009-06-23 22:38:12 +0000
commit53d605e12c3765aeedabf2bfe0c5cc338dc95d5a (patch)
tree574d59fe89c1af06fbc67b38cb2d0a3f9a6ef1d7 /src/jtag
parent5e98c71436569d39ac9fe0fb66910f28c0e531f8 (diff)
downloadopenocd+libswd-53d605e12c3765aeedabf2bfe0c5cc338dc95d5a.tar.gz
openocd+libswd-53d605e12c3765aeedabf2bfe0c5cc338dc95d5a.tar.bz2
openocd+libswd-53d605e12c3765aeedabf2bfe0c5cc338dc95d5a.tar.xz
openocd+libswd-53d605e12c3765aeedabf2bfe0c5cc338dc95d5a.zip
- Fixes '!=' whitespace
- Replace ')\(!=\)\(\w\)' with ') \1 \2'. - Replace '\(\w\)\(!=\)(' with '\1 \2 ('. - Replace '\(\w\)\(!=\)\(\w\)' with '\1 \2 \3'. git-svn-id: svn://svn.berlios.de/openocd/trunk@2363 b42882b7-edfa-0310-969c-e2dbd0fdcd60
Diffstat (limited to 'src/jtag')
-rw-r--r--src/jtag/bitbang.c2
-rw-r--r--src/jtag/bitq.c8
-rw-r--r--src/jtag/core.c6
-rw-r--r--src/jtag/driver.c4
-rw-r--r--src/jtag/ft2232.c2
-rw-r--r--src/jtag/jlink.c2
-rw-r--r--src/jtag/jtag.h2
-rw-r--r--src/jtag/presto.c4
-rw-r--r--src/jtag/tcl.c2
-rw-r--r--src/jtag/zy1000/jtag_minidriver.h6
-rw-r--r--src/jtag/zy1000/zy1000.c12
11 files changed, 25 insertions, 25 deletions
diff --git a/src/jtag/bitbang.c b/src/jtag/bitbang.c
index f39859af..e3cd63be 100644
--- a/src/jtag/bitbang.c
+++ b/src/jtag/bitbang.c
@@ -204,7 +204,7 @@ static void bitbang_scan(bool ir_scan, enum scan_type type, uint8_t *buffer, int
bitbang_interface->write(0, tms, tdi);
- if (type!=SCAN_OUT)
+ if (type != SCAN_OUT)
val=bitbang_interface->read();
bitbang_interface->write(1, tms, tdi);
diff --git a/src/jtag/bitq.c b/src/jtag/bitq.c
index be5e8c73..06484468 100644
--- a/src/jtag/bitq.c
+++ b/src/jtag/bitq.c
@@ -72,7 +72,7 @@ void bitq_in_proc(void)
if (field->num_bits>bitq_in_bufsize * 8)
{
/* buffer previously allocated? */
- if (bitq_in_buffer!=NULL)
+ if (bitq_in_buffer != NULL)
{
/* free it */
free(bitq_in_buffer);
@@ -241,7 +241,7 @@ void bitq_scan_field(scan_field_t* field, int pause)
out_ptr = field->out_value;
for (bit_cnt = field->num_bits; bit_cnt>1; bit_cnt--)
{
- bitq_io(0, ( (*out_ptr) & out_mask )!=0, tdo_req);
+ bitq_io(0, ( (*out_ptr) & out_mask ) != 0, tdo_req);
if (out_mask==0x80)
{
out_mask = 0x01;
@@ -251,7 +251,7 @@ void bitq_scan_field(scan_field_t* field, int pause)
out_mask <<= 1;
}
- bitq_io(pause, ( (*out_ptr) & out_mask )!=0, tdo_req);
+ bitq_io(pause, ( (*out_ptr) & out_mask ) != 0, tdo_req);
}
if (pause)
@@ -382,7 +382,7 @@ int bitq_execute_queue(void)
void bitq_cleanup(void)
{
- if (bitq_in_buffer!=NULL)
+ if (bitq_in_buffer != NULL)
{
free(bitq_in_buffer);
bitq_in_buffer = NULL;
diff --git a/src/jtag/core.c b/src/jtag/core.c
index 6ebddfc7..31909964 100644
--- a/src/jtag/core.c
+++ b/src/jtag/core.c
@@ -302,7 +302,7 @@ static void jtag_prelude(tap_state_t state)
{
jtag_checks();
- assert(state!=TAP_INVALID);
+ assert(state != TAP_INVALID);
cmd_queue_cur_state = state;
}
@@ -676,7 +676,7 @@ tap_state_t jtag_set_end_state(tap_state_t state)
LOG_ERROR("BUG: TAP_DRSHIFT/IRSHIFT can't be end state. Calling code should use a larger scan field");
}
- if (state!=TAP_INVALID)
+ if (state != TAP_INVALID)
cmd_queue_end_state = state;
return cmd_queue_end_state;
}
@@ -1157,7 +1157,7 @@ static int jtag_init_inner(struct command_context_s *cmd_ctx)
}
jtag_add_tlr();
- if ((retval=jtag_execute_queue())!=ERROR_OK)
+ if ((retval=jtag_execute_queue()) != ERROR_OK)
return retval;
/* examine chain first, as this could discover the real chain layout */
diff --git a/src/jtag/driver.c b/src/jtag/driver.c
index 0e352b05..1e9af54b 100644
--- a/src/jtag/driver.c
+++ b/src/jtag/driver.c
@@ -493,10 +493,10 @@ int interface_jtag_execute_queue(void)
if (retval == ERROR_OK)
{
struct jtag_callback_entry *entry;
- for (entry=jtag_callback_queue_head; entry!=NULL; entry=entry->next)
+ for (entry=jtag_callback_queue_head; entry != NULL; entry=entry->next)
{
retval=entry->callback(entry->data0, entry->data1, entry->data2, entry->data3);
- if (retval!=ERROR_OK)
+ if (retval != ERROR_OK)
break;
}
}
diff --git a/src/jtag/ft2232.c b/src/jtag/ft2232.c
index c38d7d47..14ee7d14 100644
--- a/src/jtag/ft2232.c
+++ b/src/jtag/ft2232.c
@@ -52,7 +52,7 @@
#if (BUILD_FT2232_FTD2XX==1 && BUILD_FT2232_LIBFTDI==1)
#error "BUILD_FT2232_FTD2XX && BUILD_FT2232_LIBFTDI are mutually exclusive"
-#elif (BUILD_FT2232_FTD2XX!=1 && BUILD_FT2232_LIBFTDI!=1)
+#elif (BUILD_FT2232_FTD2XX != 1 && BUILD_FT2232_LIBFTDI != 1)
#error "BUILD_FT2232_FTD2XX || BUILD_FT2232_LIBFTDI must be chosen"
#endif
diff --git a/src/jtag/jlink.c b/src/jtag/jlink.c
index 283260ee..97a8e485 100644
--- a/src/jtag/jlink.c
+++ b/src/jtag/jlink.c
@@ -751,7 +751,7 @@ static void jlink_tap_append_scan(int length, uint8_t *buffer, scan_command_t *c
for (i = 0; i < length; i++)
{
int tms = (i < (length - 1)) ? 0 : 1;
- int tdi = (buffer[i / 8] & (1 << (i % 8)))!=0;
+ int tdi = (buffer[i / 8] & (1 << (i % 8))) != 0;
jlink_tap_append_step(tms, tdi);
}
pending_scan_results_length++;
diff --git a/src/jtag/jtag.h b/src/jtag/jtag.h
index 951a25da..37adac76 100644
--- a/src/jtag/jtag.h
+++ b/src/jtag/jtag.h
@@ -614,7 +614,7 @@ void jtag_add_clocks(int num_cycles);
* matter if the operation was executed *before* jtag_execute_queue(),
* jtag_execute_queue() will still return an error code.
*
- * All jtag_add_xxx() calls that have in_handler!=NULL will have been
+ * All jtag_add_xxx() calls that have in_handler != NULL will have been
* executed when this fn returns, but if what has been queued only
* clocks data out, without reading anything back, then JTAG could
* be running *after* jtag_execute_queue() returns. The API does
diff --git a/src/jtag/presto.c b/src/jtag/presto.c
index 1331f2af..bd1cc5d4 100644
--- a/src/jtag/presto.c
+++ b/src/jtag/presto.c
@@ -279,7 +279,7 @@ static int presto_open_ftd2xx(char *req_serial)
if ((presto->status = FT_Read(presto->handle, &presto_data, 1, &ftbytes)) != FT_OK)
return ERROR_JTAG_DEVICE_ERROR;
- if (ftbytes!=1)
+ if (ftbytes != 1)
{
LOG_DEBUG("PRESTO reset");
@@ -313,7 +313,7 @@ static int presto_open_ftd2xx(char *req_serial)
if ((presto->status = FT_Read(presto->handle, &presto_data, 1, &ftbytes)) != FT_OK)
return ERROR_JTAG_DEVICE_ERROR;
- if (ftbytes!=1)
+ if (ftbytes != 1)
{
LOG_DEBUG("PRESTO not responding");
return ERROR_JTAG_DEVICE_ERROR;
diff --git a/src/jtag/tcl.c b/src/jtag/tcl.c
index d09e7812..2be7f87b 100644
--- a/src/jtag/tcl.c
+++ b/src/jtag/tcl.c
@@ -1262,7 +1262,7 @@ static int Jim_Command_drscan(Jim_Interp *interp, int argc, Jim_Obj *const *args
* args[N-2] = "-endstate"
* args[N-1] = statename
*/
- if ((argc < 4) || ((argc % 2)!=0))
+ if ((argc < 4) || ((argc % 2) != 0))
{
Jim_WrongNumArgs(interp, 1, args, "wrong arguments");
return JIM_ERR;
diff --git a/src/jtag/zy1000/jtag_minidriver.h b/src/jtag/zy1000/jtag_minidriver.h
index 496dfd20..22307aa9 100644
--- a/src/jtag/zy1000/jtag_minidriver.h
+++ b/src/jtag/zy1000/jtag_minidriver.h
@@ -79,7 +79,7 @@ static void setCurrentState(enum tap_state state)
}
/*
- * Enter state and cause repeat transitions *out* of that state. So if the endState!=state, then
+ * Enter state and cause repeat transitions *out* of that state. So if the endState != state, then
* the transition from state to endState counts as a transition out of state.
*/
static __inline__ void shiftValueInner(const enum tap_state state, const enum tap_state endState, int repeat, cyg_uint32 value)
@@ -92,7 +92,7 @@ static __inline__ void shiftValueInner(const enum tap_state state, const enum ta
ZY1000_POKE(ZY1000_JTAG_BASE+0xc, value);
#if 1
#if TEST_MANUAL()
- if ((state==TAP_DRSHIFT)&&(endState!=TAP_DRSHIFT))
+ if ((state==TAP_DRSHIFT)&&(endState != TAP_DRSHIFT))
{
int i;
setCurrentState(state);
@@ -100,7 +100,7 @@ static __inline__ void shiftValueInner(const enum tap_state state, const enum ta
{
int tms;
tms=0;
- if ((i==repeat-1)&&(state!=endState))
+ if ((i==repeat-1)&&(state != endState))
{
tms=1;
}
diff --git a/src/jtag/zy1000/zy1000.c b/src/jtag/zy1000/zy1000.c
index 8f9b774f..d31b4336 100644
--- a/src/jtag/zy1000/zy1000.c
+++ b/src/jtag/zy1000/zy1000.c
@@ -133,7 +133,7 @@ void zy1000_reset(int trst, int srst)
}
else
{
- /* Danger!!! if clk!=0 when in
+ /* Danger!!! if clk != 0 when in
* idle in TAP_IDLE, reset halt on str912 will fail.
*/
ZY1000_POKE(ZY1000_JTAG_BASE+0x10, 0x00000001);
@@ -309,7 +309,7 @@ zylinjtag_Jim_Command_powerstatus(Jim_Interp *interp,
cyg_uint32 status;
ZY1000_PEEK(ZY1000_JTAG_BASE+0x10, status);
- Jim_SetResult(interp, Jim_NewIntObj(interp, (status&0x80)!=0));
+ Jim_SetResult(interp, Jim_NewIntObj(interp, (status&0x80) != 0));
return JIM_OK;
}
@@ -363,7 +363,7 @@ int interface_jtag_execute_queue(void)
/* clear JTAG error register */
ZY1000_POKE(ZY1000_JTAG_BASE+0x14, 0x400);
- if ((empty&0x400)!=0)
+ if ((empty&0x400) != 0)
{
LOG_WARNING("RCLK timeout");
/* the error is informative only as we don't want to break the firmware if there
@@ -427,7 +427,7 @@ static __inline void scanFields(int num_fields, const scan_field_t *fields, tap_
// figure out where to store the input data
int num_bits=fields[i].num_bits;
- if (fields[i].in_value!=NULL)
+ if (fields[i].in_value != NULL)
{
inBuffer=fields[i].in_value;
}
@@ -453,7 +453,7 @@ static __inline void scanFields(int num_fields, const scan_field_t *fields, tap_
// we have (num_bits+7)/8 bytes of bits to toggle out.
// bits are pushed out LSB to MSB
value=0;
- if (fields[i].out_value!=NULL)
+ if (fields[i].out_value != NULL)
{
for (l=0; l<k; l+=8)
{
@@ -465,7 +465,7 @@ static __inline void scanFields(int num_fields, const scan_field_t *fields, tap_
shiftValueInner(shiftState, pause_state, k, value);
- if (inBuffer!=NULL)
+ if (inBuffer != NULL)
{
// data in, LSB to MSB
value=getShiftValue();