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
This commit is contained in:
oharboe 2009-05-16 20:09:07 +00:00
parent 1bcbd44ed3
commit 231a71b7fb
11 changed files with 22 additions and 22 deletions

View File

@ -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;

View File

@ -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;

View File

@ -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;

View File

@ -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;

View File

@ -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;

View File

@ -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;

View File

@ -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;

View File

@ -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 */

View File

@ -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;

View File

@ -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();

View File

@ -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;