This is an automated email from Gerrit.

Steven Stallion ([email protected]) just uploaded a new patch set to Gerrit, 
which you can find at http://openocd.zylin.com/4082

-- gerrit

commit 194f4215ae9003f10a2ec5fc4a41344441b6af60
Author: Steven Stallion <[email protected]>
Date:   Sun Mar 26 15:01:56 2017 -0500

    jtag: make cmd_queue_scan_field_clone public
    
    This patch makes the cmd_queue_scan_field_clone function public. This
    permits targets to insert fields without affecting the submitted
    scan_field list. This will be used in an upcoming target implementation
    that needs to insert additional padding bits.
    
    Change-Id: I8fbd3b9b4e413432471f4f1444048932c8fa189e
    Signed-off-by: Steven Stallion <[email protected]>

diff --git a/src/jtag/commands.c b/src/jtag/commands.c
index ed40755..5bf73c5 100644
--- a/src/jtag/commands.c
+++ b/src/jtag/commands.c
@@ -136,6 +136,18 @@ static void cmd_queue_free(void)
        cmd_queue_pages_tail = NULL;
 }
 
+/**
+ * Copy a struct scan_field for insertion into the queue.
+ *
+ * This allocates a new copy of out_value using cmd_queue_alloc.
+ */
+void cmd_queue_scan_field_clone(struct scan_field *dst, const struct 
scan_field *src)
+{
+       dst->num_bits   = src->num_bits;
+       dst->out_value  = buf_cpy(src->out_value, 
cmd_queue_alloc(DIV_ROUND_UP(src->num_bits, 8)), src->num_bits);
+       dst->in_value   = src->in_value;
+}
+
 void jtag_command_queue_reset(void)
 {
        cmd_queue_free();
diff --git a/src/jtag/commands.h b/src/jtag/commands.h
index 947c947..f5e843f 100644
--- a/src/jtag/commands.h
+++ b/src/jtag/commands.h
@@ -165,6 +165,8 @@ extern struct jtag_command *jtag_command_queue;
 
 void *cmd_queue_alloc(size_t size);
 
+void cmd_queue_scan_field_clone(struct scan_field *dst, const struct 
scan_field *src);
+
 void jtag_queue_command(struct jtag_command *cmd);
 void jtag_command_queue_reset(void);
 
diff --git a/src/jtag/drivers/driver.c b/src/jtag/drivers/driver.c
index daf7cd4..5dbdba0 100644
--- a/src/jtag/drivers/driver.c
+++ b/src/jtag/drivers/driver.c
@@ -56,18 +56,6 @@ static void jtag_callback_queue_reset(void)
 }
 
 /**
- * Copy a struct scan_field for insertion into the queue.
- *
- * This allocates a new copy of out_value using cmd_queue_alloc.
- */
-static void cmd_queue_scan_field_clone(struct scan_field *dst, const struct 
scan_field *src)
-{
-       dst->num_bits   = src->num_bits;
-       dst->out_value  = buf_cpy(src->out_value, 
cmd_queue_alloc(DIV_ROUND_UP(src->num_bits, 8)), src->num_bits);
-       dst->in_value   = src->in_value;
-}
-
-/**
  * see jtag_add_ir_scan()
  *
  */

-- 

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
OpenOCD-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/openocd-devel

Reply via email to