mirror of
https://github.com/trabucayre/openFPGALoader.git
synced 2026-08-30 01:48:50 +02:00
usbBlaster: fix read bit align and don't potentially write when just set clk low
This commit is contained in:
+2
-2
@@ -260,8 +260,8 @@ int UsbBlaster::writeTDI(uint8_t *tx, uint8_t *rx, uint32_t len, bool end)
|
||||
if (writeBit((rx)? &tmp:NULL, 1) < 0)
|
||||
return -EXIT_FAILURE;
|
||||
if (rx)
|
||||
*rx_ptr |= ((tmp & 0x80) << (7 - nb_bit));
|
||||
_in_buf[_nb_bit++] = mask | mode;
|
||||
*rx_ptr = (tmp & 0x80) | ((*rx_ptr) >> 1);
|
||||
_in_buf[_nb_bit++] = mask;
|
||||
if (writeBit(NULL, 0) < 0)
|
||||
return -EXIT_FAILURE;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user