]> git.sur5r.net Git - openocd/commitdiff
Add jtag_queue_command() by Michael Bruck <mbruck@digenius.de>
authorkc8apf <kc8apf@b42882b7-edfa-0310-969c-e2dbd0fdcd60>
Mon, 18 May 2009 17:27:00 +0000 (17:27 +0000)
committerkc8apf <kc8apf@b42882b7-edfa-0310-969c-e2dbd0fdcd60>
Mon, 18 May 2009 17:27:00 +0000 (17:27 +0000)
git-svn-id: svn://svn.berlios.de/openocd/trunk@1815 b42882b7-edfa-0310-969c-e2dbd0fdcd60

src/jtag/jtag.c

index f6ddd8df9401e90493f96a697ae72c687d89cec3..f801fb7bb072721135de28973b3ca361f2540e2c 100644 (file)
@@ -439,6 +439,21 @@ jtag_command_t** jtag_get_last_command_p(void)
        return last_comand_pointer;
 }
 
+
+void jtag_queue_command(jtag_command_t * cmd)
+{
+       jtag_command_t **last_cmd;
+
+       last_cmd = jtag_get_last_command_p();
+
+       *last_cmd = cmd;
+
+       (*last_cmd)->next = NULL;
+
+       last_comand_pointer = &((*last_cmd)->next);
+}
+
+
 void* cmd_queue_alloc(size_t size)
 {
        cmd_queue_page_t **p_page = &cmd_queue_pages;