X-Git-Url: https://git.sur5r.net/?a=blobdiff_plain;f=src%2Fjtag%2Fusbprog.c;h=487e9b1611d83e1fd7911e947bd493b398838a47;hb=a9d5119825aef1cbca3d9f6931cedafbfc7bcaed;hp=dfde29551f2f9548e79763947c47763d11ef4e80;hpb=7992eaf0fcfa3afe9941200fd76b0c296aadb356;p=openocd diff --git a/src/jtag/usbprog.c b/src/jtag/usbprog.c index dfde2955..487e9b16 100644 --- a/src/jtag/usbprog.c +++ b/src/jtag/usbprog.c @@ -34,7 +34,8 @@ #include "config.h" #endif -#include "jtag.h" +#include "interface.h" +#include "commands.h" #include @@ -149,16 +150,14 @@ static int usbprog_execute_queue(void) #ifdef _DEBUG_JTAG_IO_ LOG_DEBUG("runtest %i cycles, end in %i", cmd->cmd.runtest->num_cycles, cmd->cmd.runtest->end_state); #endif - if (cmd->cmd.runtest->end_state != TAP_INVALID) - usbprog_end_state(cmd->cmd.runtest->end_state); + usbprog_end_state(cmd->cmd.runtest->end_state); usbprog_runtest(cmd->cmd.runtest->num_cycles); break; case JTAG_STATEMOVE: #ifdef _DEBUG_JTAG_IO_ LOG_DEBUG("statemove end in %i", cmd->cmd.statemove->end_state); #endif - if (cmd->cmd.statemove->end_state != TAP_INVALID) - usbprog_end_state(cmd->cmd.statemove->end_state); + usbprog_end_state(cmd->cmd.statemove->end_state); usbprog_state_move(); break; case JTAG_PATHMOVE: @@ -172,8 +171,7 @@ static int usbprog_execute_queue(void) #ifdef _DEBUG_JTAG_IO_ LOG_DEBUG("scan end in %i", cmd->cmd.scan->end_state); #endif - if (cmd->cmd.scan->end_state != TAP_INVALID) - usbprog_end_state(cmd->cmd.scan->end_state); + usbprog_end_state(cmd->cmd.scan->end_state); scan_size = jtag_build_buffer(cmd->cmd.scan, &buffer); type = jtag_scan_type(cmd->cmd.scan); usbprog_scan(cmd->cmd.scan->ir_scan, type, buffer, scan_size);