jtag: allows caller to specify tdi level in toggleClk method

This commit is contained in:
Gwenhael Goavec-Merou 2025-06-17 11:34:35 +02:00
parent f41f85b9d4
commit 098cdd466a
2 changed files with 3 additions and 3 deletions

View File

@ -371,11 +371,11 @@ int Jtag::read_write(const uint8_t *tdi, unsigned char *tdo, int len, char last)
return 0; return 0;
} }
void Jtag::toggleClk(int nb) void Jtag::toggleClk(int nb, uint8_t tdi)
{ {
unsigned char c = (TEST_LOGIC_RESET == _state) ? 1 : 0; unsigned char c = (TEST_LOGIC_RESET == _state) ? 1 : 0;
flushTMS(false); flushTMS(false);
if (_jtag->toggleClk(c, 0, nb) >= 0) if (_jtag->toggleClk(c, tdi, nb) >= 0)
return; return;
throw std::exception(); throw std::exception();
return; return;

View File

@ -133,7 +133,7 @@ class Jtag {
tapState_t end_state = RUN_TEST_IDLE); tapState_t end_state = RUN_TEST_IDLE);
int read_write(const uint8_t *tdi, unsigned char *tdo, int len, char last); int read_write(const uint8_t *tdi, unsigned char *tdo, int len, char last);
void toggleClk(int nb); void toggleClk(int nb, uint8_t tdi = 0);
void go_test_logic_reset(); void go_test_logic_reset();
void set_state(tapState_t newState, const uint8_t tdi = 1); void set_state(tapState_t newState, const uint8_t tdi = 1);
int flushTMS(bool flush_buffer = false); int flushTMS(bool flush_buffer = false);