From 172032462b3b4a7a8df3107b2a4e82b9781e1969 Mon Sep 17 00:00:00 2001 From: Marcel Telka Date: Mon, 26 Aug 2002 23:04:25 +0000 Subject: [PATCH] Added data_registers to part. git-svn-id: https://urjtag.svn.sourceforge.net/svnroot/urjtag/trunk@115 b68d4a1b-bc3d-0410-92ed-d4ac073336b7 --- include/jtag/part.h | 2 ++ jtag/src/part/part.c | 7 +++++++ 2 files changed, 9 insertions(+) diff --git a/include/jtag/part.h b/include/jtag/part.h index 92b942f9..98b49ced 100644 --- a/include/jtag/part.h +++ b/include/jtag/part.h @@ -29,6 +29,7 @@ #include #include +#include #include typedef struct part part; @@ -38,6 +39,7 @@ struct part { int instruction_length; instruction *instructions; instruction *active_instruction; + data_register *data_registers; int boundary_length; bsbit **bsbits; tap_register *idr; diff --git a/jtag/src/part/part.c b/jtag/src/part/part.c index 2386159d..e4755359 100644 --- a/jtag/src/part/part.c +++ b/jtag/src/part/part.c @@ -40,6 +40,7 @@ part_alloc( void ) p->instruction_length = 0; p->instructions = NULL; p->active_instruction = NULL; + p->data_registers = NULL; p->boundary_length = 0; p->bsbits = NULL; p->idr = NULL; @@ -71,6 +72,12 @@ part_free( part *p ) instruction_free( i ); } + while (p->data_registers) { + data_register *dr = p->data_registers; + p->data_registers = dr->next; + data_register_free( dr ); + } + /* bsbits */ for (i = 0; i < p->boundary_length; i++) bsbit_free( p->bsbits[i] );