Added part_find_data_register().

git-svn-id: https://urjtag.svn.sourceforge.net/svnroot/urjtag/trunk@117 b68d4a1b-bc3d-0410-92ed-d4ac073336b7
master
Marcel Telka 23 years ago
parent e67cee70fe
commit ab98640b14

@ -51,6 +51,7 @@ part *part_alloc( void );
void part_free( part *p );
part *read_part( FILE *f, const tap_register *idr );
instruction *part_find_instruction( part *p, const char *iname );
data_register *part_find_data_register( part *p, const char *drname );
void part_set_signal( part *p, const char *pname, int out, int val );
int part_get_signal( part *p, const char *pname );

@ -111,6 +111,24 @@ part_find_instruction( part *p, const char *iname )
return i;
}
data_register *
part_find_data_register( part *p, const char *drname )
{
data_register *dr;
if (!p || !drname)
return NULL;
dr = p->data_registers;
while (dr) {
if (strcmp( drname, dr->name ) == 0)
break;
dr = dr->next
}
return dr;
}
void
part_set_signal( part *p, const char *pname, int out, int val )
{

Loading…
Cancel
Save