summaryrefslogtreecommitdiff
path: root/src/jtag
diff options
context:
space:
mode:
authorzwelch <zwelch@b42882b7-edfa-0310-969c-e2dbd0fdcd60>2009-06-23 22:39:47 +0000
committerzwelch <zwelch@b42882b7-edfa-0310-969c-e2dbd0fdcd60>2009-06-23 22:39:47 +0000
commit128a73342856217e98a5da64b2805e062fd4e00d (patch)
tree3cd1656b9f3eb2e9be261b003283dce596362d7a /src/jtag
parent319fdecb76318ec982855f298b1a4a3a60375748 (diff)
downloadopenocd+libswd-128a73342856217e98a5da64b2805e062fd4e00d.tar.gz
openocd+libswd-128a73342856217e98a5da64b2805e062fd4e00d.tar.bz2
openocd+libswd-128a73342856217e98a5da64b2805e062fd4e00d.tar.xz
openocd+libswd-128a73342856217e98a5da64b2805e062fd4e00d.zip
- Fixes '&&' whitespace
- Replace ')\(&&\)(' with ') \1 ('. - Replace '\(\w\)\(&&\)(' with '\1 \2 ('. - Replace '\(\w\)\(&&\)\(\w\)' with '\1 \2 \3'. git-svn-id: svn://svn.berlios.de/openocd/trunk@2366 b42882b7-edfa-0310-969c-e2dbd0fdcd60
Diffstat (limited to 'src/jtag')
-rw-r--r--src/jtag/core.c6
-rw-r--r--src/jtag/zy1000/jtag_minidriver.h10
-rw-r--r--src/jtag/zy1000/zy1000.c2
3 files changed, 9 insertions, 9 deletions
diff --git a/src/jtag/core.c b/src/jtag/core.c
index 31909964..09f62c30 100644
--- a/src/jtag/core.c
+++ b/src/jtag/core.c
@@ -324,7 +324,7 @@ void jtag_add_ir_scan_noverify(int in_count, const scan_field_t *in_fields,
void jtag_add_ir_scan(int in_num_fields, scan_field_t *in_fields, tap_state_t state)
{
- if (jtag_verify&&jtag_verify_capture_ir)
+ if (jtag_verify && jtag_verify_capture_ir)
{
/* 8 x 32 bit id's is enough for all invocations */
@@ -579,9 +579,9 @@ void jtag_add_reset(int req_tlr_or_trst, int req_srst)
((jtag_reset_config & RESET_SRST_PULLS_TRST)==0))
{
if (((req_tlr_or_trst&&!jtag_trst)||
- (!req_tlr_or_trst&&jtag_trst))&&
+ (!req_tlr_or_trst && jtag_trst))&&
((req_srst&&!jtag_srst)||
- (!req_srst&&jtag_srst)))
+ (!req_srst && jtag_srst)))
{
/* FIX!!! srst_pulls_trst allows 1,1 => 0,0 transition.... */
//LOG_ERROR("BUG: transition of req_tlr_or_trst and req_srst in the same jtag_add_reset() call is undefined");
diff --git a/src/jtag/zy1000/jtag_minidriver.h b/src/jtag/zy1000/jtag_minidriver.h
index 22307aa9..37e9b35a 100644
--- a/src/jtag/zy1000/jtag_minidriver.h
+++ b/src/jtag/zy1000/jtag_minidriver.h
@@ -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;
}
@@ -124,7 +124,7 @@ static __inline__ void shiftValueInner(const enum tap_state state, const enum ta
#endif
#else
/* maximum debug version */
- if ((repeat>0)&&((state==TAP_DRSHIFT)||(state==TAP_SI)))
+ if ((repeat>0) && ((state==TAP_DRSHIFT)||(state==TAP_SI)))
{
int i;
/* sample shift register for every bit. */
@@ -188,13 +188,13 @@ static __inline__ void interface_jtag_add_dr_out(jtag_tap_t *target_tap,
{
int singletap=(jtag_tap_next_enabled(jtag_tap_next_enabled(NULL))==NULL);
- if ((singletap)&&(num_fields==3))
+ if ((singletap) && (num_fields==3))
{
/* used by embeddedice_write_reg_inner() */
shiftValueInner(TAP_DRSHIFT, TAP_DRSHIFT, num_bits[0], value[0]);
shiftValueInner(TAP_DRSHIFT, TAP_DRSHIFT, num_bits[1], value[1]);
shiftValueInner(TAP_DRSHIFT, end_state, num_bits[2], value[2]);
- } else if ((singletap)&&(num_fields==2))
+ } else if ((singletap) && (num_fields==2))
{
/* used by arm7 code */
shiftValueInner(TAP_DRSHIFT, TAP_DRSHIFT, num_bits[0], value[0]);
diff --git a/src/jtag/zy1000/zy1000.c b/src/jtag/zy1000/zy1000.c
index 5e4bda0f..29ab3e46 100644
--- a/src/jtag/zy1000/zy1000.c
+++ b/src/jtag/zy1000/zy1000.c
@@ -149,7 +149,7 @@ void zy1000_reset(int trst, int srst)
ZY1000_POKE(ZY1000_JTAG_BASE+0x10, 0x00000002);
}
- if (trst||(srst&&(jtag_get_reset_config() & RESET_SRST_PULLS_TRST)))
+ if (trst||(srst && (jtag_get_reset_config() & RESET_SRST_PULLS_TRST)))
{
waitIdle();
/* we're now in the RESET state until trst is deasserted */