Skip to content

Commit

Permalink
InitializeChain() now removes old instances so it can be called multi…
Browse files Browse the repository at this point in the history
…ple times
  • Loading branch information
azonenberg committed Jul 24, 2018
1 parent 2ed8d77 commit aee303e
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions JtagInterface.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -193,6 +193,12 @@ void JtagInterface::PrintChainFaultMessage()
*/
void JtagInterface::InitializeChain()
{
//Clear out any junk already on the chain. This is necessary if chain state ever changes
m_idcodes.clear();
for(auto d : m_devices)
delete d;
m_devices.clear();

unsigned char lots_of_ones[128];
memset(lots_of_ones, 0xff, sizeof(lots_of_ones));
unsigned char lots_of_zeros[128];
Expand Down

0 comments on commit aee303e

Please sign in to comment.