]> git.sur5r.net Git - openocd/commitdiff
Michael Bruck <mbruck@digenius.de> change 'ir_scan' from 'int' to 'bool' to document...
authoroharboe <oharboe@b42882b7-edfa-0310-969c-e2dbd0fdcd60>
Sat, 16 May 2009 20:09:07 +0000 (20:09 +0000)
committeroharboe <oharboe@b42882b7-edfa-0310-969c-e2dbd0fdcd60>
Sat, 16 May 2009 20:09:07 +0000 (20:09 +0000)
git-svn-id: svn://svn.berlios.de/openocd/trunk@1800 b42882b7-edfa-0310-969c-e2dbd0fdcd60

src/jtag/amt_jtagaccel.c
src/jtag/arm-jtag-ew.c
src/jtag/bitbang.c
src/jtag/ft2232.c
src/jtag/gw16012.c
src/jtag/jlink.c
src/jtag/jtag.c
src/jtag/jtag.h
src/jtag/rlink/rlink.c
src/jtag/usbprog.c
src/jtag/vsllink.c

index ff9cbdaae9bcf48fa2ae248e7ac8a497a494e8b3..f739dce039d6e848cf54f3584c5781c5104fd5b6 100644 (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;
index 3b4bfa7eea6ec7e46c88f1a9742225bd4f4a4465..0c00cace76a44f5d5d5bff00fb17d81154923bbd 100644 (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;
 
index f407deb18a6a917d8570c760332b62a5bb83f813..9cb7edc03258f6e069388d3f6ac71c0a07cb19bc 100644 (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;
index 70050babe8e9eac3bb3936cdebe9d0ec1804f77a..27ad2ed22a00a10259f8363f341acc1bd90d5e46 100644 (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;
index 7845e778892c7c14e679fdfd01cc63438bd4adf3..d8502d9f18c67347486ed4686663055bf588507a 100644 (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;
index f984639b27e5d0f040fd37ac3e8efebd455a47d9..90fb42c4cfc7ca53e84bfc17ef8ceefcfed00e70 100644 (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;
 
index c58cde6fe05020525234a7923b73bfe15495478e..dd3cbf2465ca9762eb129ef5fd3c480ef68c4990 100644 (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;
index ccd17ffea93195ad2cf009752d84950aebb8c7bc..5e25fea6cbd1861824086cb4e2ecf9821cad3340 100644 (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 */
index 683a1545d08d1a48df403ee77b69116df2a95325..77cab9b9ee3857c9a979b6944659e21056db890a 100644 (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;
index 50a55aa9e326d8c00ee8ed011e676b7229a6958b..7e4b9986ebcb37a1308dcef9a770c024687bfbe2 100644 (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();
 
index 9a52af38f5bae124fdc958722456933a23eb93f0..57f69bcd6d4010f45b6df36c47e30051db542643 100644 (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;