summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authoroharboe <oharboe@b42882b7-edfa-0310-969c-e2dbd0fdcd60>2009-05-16 20:09:07 +0000
committeroharboe <oharboe@b42882b7-edfa-0310-969c-e2dbd0fdcd60>2009-05-16 20:09:07 +0000
commit231a71b7fba9277aaa7772a78788ebded3253b47 (patch)
treedebdbe174dab15465c6fe48d1653736e91e384a3
parent1bcbd44ed3a3165f1845b9da1f8c282321fe5988 (diff)
downloadopenocd_libswd-231a71b7fba9277aaa7772a78788ebded3253b47.tar.gz
openocd_libswd-231a71b7fba9277aaa7772a78788ebded3253b47.tar.bz2
openocd_libswd-231a71b7fba9277aaa7772a78788ebded3253b47.tar.xz
openocd_libswd-231a71b7fba9277aaa7772a78788ebded3253b47.zip
Michael Bruck <mbruck@digenius.de> change 'ir_scan' from 'int' to 'bool' to document its semantics
git-svn-id: svn://svn.berlios.de/openocd/trunk@1800 b42882b7-edfa-0310-969c-e2dbd0fdcd60
-rw-r--r--src/jtag/amt_jtagaccel.c2
-rw-r--r--src/jtag/arm-jtag-ew.c4
-rw-r--r--src/jtag/bitbang.c2
-rw-r--r--src/jtag/ft2232.c2
-rw-r--r--src/jtag/gw16012.c2
-rw-r--r--src/jtag/jlink.c4
-rw-r--r--src/jtag/jtag.c10
-rw-r--r--src/jtag/jtag.h2
-rw-r--r--src/jtag/rlink/rlink.c2
-rw-r--r--src/jtag/usbprog.c4
-rw-r--r--src/jtag/vsllink.c10
11 files changed, 22 insertions, 22 deletions
diff --git a/src/jtag/amt_jtagaccel.c b/src/jtag/amt_jtagaccel.c
index ff9cbdaa..f739dce0 100644
--- a/src/jtag/amt_jtagaccel.c
+++ b/src/jtag/amt_jtagaccel.c
@@ -233,7 +233,7 @@ static void amt_jtagaccel_runtest(int num_cycles)
amt_jtagaccel_state_move();
}
-static void amt_jtagaccel_scan(int ir_scan, enum scan_type type, u8 *buffer, int scan_size)
+static void amt_jtagaccel_scan(bool ir_scan, enum scan_type type, u8 *buffer, int scan_size)
{
int bits_left = scan_size;
int bit_count = 0;
diff --git a/src/jtag/arm-jtag-ew.c b/src/jtag/arm-jtag-ew.c
index 3b4bfa7e..0c00cace 100644
--- a/src/jtag/arm-jtag-ew.c
+++ b/src/jtag/arm-jtag-ew.c
@@ -72,7 +72,7 @@ static void armjtagew_end_state(tap_state_t state);
static void armjtagew_state_move(void);
static void armjtagew_path_move(int num_states, tap_state_t *path);
static void armjtagew_runtest(int num_cycles);
-static void armjtagew_scan(int ir_scan, enum scan_type type, u8 *buffer, int scan_size, scan_command_t *command);
+static void armjtagew_scan(bool ir_scan, enum scan_type type, u8 *buffer, int scan_size, scan_command_t *command);
static void armjtagew_reset(int trst, int srst);
//static void armjtagew_simple_command(u8 command);
static int armjtagew_get_status(void);
@@ -401,7 +401,7 @@ static void armjtagew_runtest(int num_cycles)
}
}
-static void armjtagew_scan(int ir_scan, enum scan_type type, u8 *buffer, int scan_size, scan_command_t *command)
+static void armjtagew_scan(bool ir_scan, enum scan_type type, u8 *buffer, int scan_size, scan_command_t *command)
{
tap_state_t saved_end_state;
diff --git a/src/jtag/bitbang.c b/src/jtag/bitbang.c
index f407deb1..9cb7edc0 100644
--- a/src/jtag/bitbang.c
+++ b/src/jtag/bitbang.c
@@ -168,7 +168,7 @@ static void bitbang_stableclocks(int num_cycles)
-static void bitbang_scan(int ir_scan, enum scan_type type, u8 *buffer, int scan_size)
+static void bitbang_scan(bool ir_scan, enum scan_type type, u8 *buffer, int scan_size)
{
tap_state_t saved_end_state = tap_get_end_state();
int bit_cnt;
diff --git a/src/jtag/ft2232.c b/src/jtag/ft2232.c
index 70050bab..27ad2ed2 100644
--- a/src/jtag/ft2232.c
+++ b/src/jtag/ft2232.c
@@ -573,7 +573,7 @@ static void ft2232_add_pathmove(pathmove_command_t* cmd)
}
-void ft2232_add_scan(int ir_scan, enum scan_type type, u8* buffer, int scan_size)
+void ft2232_add_scan(bool ir_scan, enum scan_type type, u8* buffer, int scan_size)
{
int num_bytes = (scan_size + 7) / 8;
int bits_left = scan_size;
diff --git a/src/jtag/gw16012.c b/src/jtag/gw16012.c
index 7845e778..d8502d9f 100644
--- a/src/jtag/gw16012.c
+++ b/src/jtag/gw16012.c
@@ -263,7 +263,7 @@ static void gw16012_runtest(int num_cycles)
gw16012_state_move();
}
-static void gw16012_scan(int ir_scan, enum scan_type type, u8 *buffer, int scan_size)
+static void gw16012_scan(bool ir_scan, enum scan_type type, u8 *buffer, int scan_size)
{
int bits_left = scan_size;
int bit_count = 0;
diff --git a/src/jtag/jlink.c b/src/jtag/jlink.c
index f984639b..90fb42c4 100644
--- a/src/jtag/jlink.c
+++ b/src/jtag/jlink.c
@@ -83,7 +83,7 @@ static void jlink_end_state(tap_state_t state);
static void jlink_state_move(void);
static void jlink_path_move(int num_states, tap_state_t *path);
static void jlink_runtest(int num_cycles);
-static void jlink_scan(int ir_scan, enum scan_type type, u8 *buffer, int scan_size, scan_command_t *command);
+static void jlink_scan(bool ir_scan, enum scan_type type, u8 *buffer, int scan_size, scan_command_t *command);
static void jlink_reset(int trst, int srst);
static void jlink_simple_command(u8 command);
static int jlink_get_status(void);
@@ -434,7 +434,7 @@ static void jlink_runtest(int num_cycles)
}
}
-static void jlink_scan(int ir_scan, enum scan_type type, u8 *buffer, int scan_size, scan_command_t *command)
+static void jlink_scan(bool ir_scan, enum scan_type type, u8 *buffer, int scan_size, scan_command_t *command)
{
tap_state_t saved_end_state;
diff --git a/src/jtag/jtag.c b/src/jtag/jtag.c
index c58cde6f..dd3cbf24 100644
--- a/src/jtag/jtag.c
+++ b/src/jtag/jtag.c
@@ -592,7 +592,7 @@ int MINIDRIVER(interface_jtag_add_ir_scan)(int num_fields, scan_field_t *fields,
/* allocate memory for ir scan command */
(*last_cmd)->cmd.scan = cmd_queue_alloc(sizeof(scan_command_t));
- (*last_cmd)->cmd.scan->ir_scan = 1;
+ (*last_cmd)->cmd.scan->ir_scan = true;
x = jtag_NumEnabledTaps();
(*last_cmd)->cmd.scan->num_fields = x; /* one field per device */
(*last_cmd)->cmd.scan->fields = cmd_queue_alloc(x * sizeof(scan_field_t));
@@ -672,7 +672,7 @@ int MINIDRIVER(interface_jtag_add_plain_ir_scan)(int num_fields, scan_field_t *f
/* allocate memory for ir scan command */
(*last_cmd)->cmd.scan = cmd_queue_alloc(sizeof(scan_command_t));
- (*last_cmd)->cmd.scan->ir_scan = 1;
+ (*last_cmd)->cmd.scan->ir_scan = true;
(*last_cmd)->cmd.scan->num_fields = num_fields;
(*last_cmd)->cmd.scan->fields = cmd_queue_alloc(num_fields * sizeof(scan_field_t));
(*last_cmd)->cmd.scan->end_state = state;
@@ -797,7 +797,7 @@ int MINIDRIVER(interface_jtag_add_dr_scan)(int num_fields, scan_field_t *fields,
/* allocate memory for dr scan command */
(*last_cmd)->cmd.scan = cmd_queue_alloc(sizeof(scan_command_t));
- (*last_cmd)->cmd.scan->ir_scan = 0;
+ (*last_cmd)->cmd.scan->ir_scan = false;
(*last_cmd)->cmd.scan->num_fields = num_fields + bypass_devices;
(*last_cmd)->cmd.scan->fields = cmd_queue_alloc((num_fields + bypass_devices) * sizeof(scan_field_t));
(*last_cmd)->cmd.scan->end_state = state;
@@ -891,7 +891,7 @@ void MINIDRIVER(interface_jtag_add_dr_out)(jtag_tap_t *target_tap,
/* allocate memory for dr scan command */
(*last_cmd)->cmd.scan = cmd_queue_alloc(sizeof(scan_command_t));
- (*last_cmd)->cmd.scan->ir_scan = 0;
+ (*last_cmd)->cmd.scan->ir_scan = false;
(*last_cmd)->cmd.scan->num_fields = num_fields + bypass_devices;
(*last_cmd)->cmd.scan->fields = cmd_queue_alloc((num_fields + bypass_devices) * sizeof(scan_field_t));
(*last_cmd)->cmd.scan->end_state = end_state;
@@ -970,7 +970,7 @@ int MINIDRIVER(interface_jtag_add_plain_dr_scan)(int num_fields, scan_field_t *f
/* allocate memory for scan command */
(*last_cmd)->cmd.scan = cmd_queue_alloc(sizeof(scan_command_t));
- (*last_cmd)->cmd.scan->ir_scan = 0;
+ (*last_cmd)->cmd.scan->ir_scan = false;
(*last_cmd)->cmd.scan->num_fields = num_fields;
(*last_cmd)->cmd.scan->fields = cmd_queue_alloc(num_fields * sizeof(scan_field_t));
(*last_cmd)->cmd.scan->end_state = state;
diff --git a/src/jtag/jtag.h b/src/jtag/jtag.h
index ccd17ffe..5e25fea6 100644
--- a/src/jtag/jtag.h
+++ b/src/jtag/jtag.h
@@ -287,7 +287,7 @@ enum scan_type {
typedef struct scan_command_s
{
- int ir_scan; /* instruction/not data scan */
+ bool ir_scan; /* instruction/not data scan */
int num_fields; /* number of fields in *fields array */
scan_field_t* fields; /* pointer to an array of data scan fields */
tap_state_t end_state; /* TAP state in which JTAG commands should finish */
diff --git a/src/jtag/rlink/rlink.c b/src/jtag/rlink/rlink.c
index 683a1545..77cab9b9 100644
--- a/src/jtag/rlink/rlink.c
+++ b/src/jtag/rlink/rlink.c
@@ -1094,7 +1094,7 @@ rlink_scan(
u8 *buffer,
int scan_size
) {
- int ir_scan;
+ bool ir_scan;
tap_state_t saved_end_state;
int byte_bits;
int extra_bits;
diff --git a/src/jtag/usbprog.c b/src/jtag/usbprog.c
index 50a55aa9..7e4b9986 100644
--- a/src/jtag/usbprog.c
+++ b/src/jtag/usbprog.c
@@ -58,7 +58,7 @@ static void usbprog_end_state(tap_state_t state);
static void usbprog_state_move(void);
static void usbprog_path_move(pathmove_command_t *cmd);
static void usbprog_runtest(int num_cycles);
-static void usbprog_scan(int ir_scan, enum scan_type type, u8 *buffer, int scan_size);
+static void usbprog_scan(bool ir_scan, enum scan_type type, u8 *buffer, int scan_size);
jtag_interface_t usbprog_interface =
{
@@ -336,7 +336,7 @@ static void usbprog_runtest(int num_cycles)
*/
}
-static void usbprog_scan(int ir_scan, enum scan_type type, u8 *buffer, int scan_size)
+static void usbprog_scan(bool ir_scan, enum scan_type type, u8 *buffer, int scan_size)
{
tap_state_t saved_end_state = tap_get_end_state();
diff --git a/src/jtag/vsllink.c b/src/jtag/vsllink.c
index 9a52af38..57f69bcd 100644
--- a/src/jtag/vsllink.c
+++ b/src/jtag/vsllink.c
@@ -204,9 +204,9 @@ static void vsllink_runtest(int num_cycles);
static void vsllink_stableclocks_dma(int num_cycles, int tms);
static void vsllink_stableclocks_normal(int num_cycles, int tms);
static void (*vsllink_stableclocks)(int num_cycles, int tms);
-static void vsllink_scan_dma(int ir_scan, enum scan_type type, u8 *buffer, int scan_size, scan_command_t *command);
-static void vsllink_scan_normal(int ir_scan, enum scan_type type, u8 *buffer, int scan_size, scan_command_t *command);
-static void (*vsllink_scan)(int ir_scan, enum scan_type type, u8 *buffer, int scan_size, scan_command_t *command);
+static void vsllink_scan_dma(bool ir_scan, enum scan_type type, u8 *buffer, int scan_size, scan_command_t *command);
+static void vsllink_scan_normal(bool ir_scan, enum scan_type type, u8 *buffer, int scan_size, scan_command_t *command);
+static void (*vsllink_scan)(bool ir_scan, enum scan_type type, u8 *buffer, int scan_size, scan_command_t *command);
static void vsllink_reset(int trst, int srst);
static void vsllink_simple_command(u8 command);
static int vsllink_connect(void);
@@ -1189,7 +1189,7 @@ static void vsllink_runtest(int num_cycles)
}
}
-static void vsllink_scan_normal(int ir_scan, enum scan_type type, u8 *buffer, int scan_size, scan_command_t *command)
+static void vsllink_scan_normal(bool ir_scan, enum scan_type type, u8 *buffer, int scan_size, scan_command_t *command)
{
tap_state_t saved_end_state;
u8 bits_left, tms_tmp, tdi_len;
@@ -1305,7 +1305,7 @@ static void vsllink_scan_normal(int ir_scan, enum scan_type type, u8 *buffer, in
tap_set_state(tap_get_end_state());
}
-static void vsllink_scan_dma(int ir_scan, enum scan_type type, u8 *buffer, int scan_size, scan_command_t *command)
+static void vsllink_scan_dma(bool ir_scan, enum scan_type type, u8 *buffer, int scan_size, scan_command_t *command)
{
tap_state_t saved_end_state;