Skip to content

Commit 098cdd4

Browse files
committed
jtag: allows caller to specify tdi level in toggleClk method
1 parent f41f85b commit 098cdd4

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

src/jtag.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -371,11 +371,11 @@ int Jtag::read_write(const uint8_t *tdi, unsigned char *tdo, int len, char last)
371371
return 0;
372372
}
373373

374-
void Jtag::toggleClk(int nb)
374+
void Jtag::toggleClk(int nb, uint8_t tdi)
375375
{
376376
unsigned char c = (TEST_LOGIC_RESET == _state) ? 1 : 0;
377377
flushTMS(false);
378-
if (_jtag->toggleClk(c, 0, nb) >= 0)
378+
if (_jtag->toggleClk(c, tdi, nb) >= 0)
379379
return;
380380
throw std::exception();
381381
return;

src/jtag.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -133,7 +133,7 @@ class Jtag {
133133
tapState_t end_state = RUN_TEST_IDLE);
134134
int read_write(const uint8_t *tdi, unsigned char *tdo, int len, char last);
135135

136-
void toggleClk(int nb);
136+
void toggleClk(int nb, uint8_t tdi = 0);
137137
void go_test_logic_reset();
138138
void set_state(tapState_t newState, const uint8_t tdi = 1);
139139
int flushTMS(bool flush_buffer = false);

0 commit comments

Comments
 (0)