ftdiJtagBitbang: quick fix to avoid overflow in writeTDI
This commit is contained in:
parent
5b19775059
commit
88522b0e91
|
|
@ -170,6 +170,10 @@ int FtdiJtagBitBang::writeTDI(uint8_t *tx, uint8_t *rx, uint32_t len, bool end)
|
||||||
if (rx)
|
if (rx)
|
||||||
memset(rx, 0, len/8);
|
memset(rx, 0, len/8);
|
||||||
|
|
||||||
|
/* quick fix: use an empty buffer */
|
||||||
|
if (_num != 0)
|
||||||
|
flush();
|
||||||
|
|
||||||
for (uint32_t i = 0, pos = 0; i < len; i++) {
|
for (uint32_t i = 0, pos = 0; i < len; i++) {
|
||||||
/* keep tms or
|
/* keep tms or
|
||||||
* set tms high if it's last bit and end true */
|
* set tms high if it's last bit and end true */
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue