Previous tap reset was made by doing 'statewalk(0x1F, 6, 0);' thus sending five 1 to TAP.
But we need to send five 1 plus one 0 to terminate TAP RESET so 'statewalk(0x3E, 7, 0);' is correct.
Moreover, it is preferable to check if 'ftdi_write_data' return exactly 3. In this case, if it write only one or two byte(s), it would pass security check but would'nt be OK.
Previous tap reset was made by doing 'statewalk(0x1F, 6, 0);' thus sending five 1 to TAP. But we need to send five 1 plus one 0 to terminate TAP RESET so 'statewalk(0x3E, 7, 0);' is correct. Moreover, it is preferable to check if 'ftdi_write_data' return exactly 3. In this case, if it write only one or two byte(s), it would pass security check but would'nt be OK.