pyftdi icon indicating copy to clipboard operation
pyftdi copied to clipboard

BitSequence.tobytes should pad to byte length before reverse

Open jtlongino opened this issue 3 years ago • 1 comments

If a BitSequence is 00000000_1 (lsb, index 0 to the left) and msb if false, the sequence will be reversed to 10000000_0 and generate a b'\x80\x00 instead of b'\x01\x00

if block for msb of false can zero-pad _seq to blength before reversing.

jtlongino avatar Apr 15 '21 14:04 jtlongino

I have not use MPPSE/JTAG for a very long time w/ PyFtdi.

I would likely accept patches through pull request, as long as there is a test that demonstrates the validity of the change (or the actual behavior being incorrect), as I do not have a way to validate the changes otherwise.

Thanks.

eblot avatar May 04 '21 17:05 eblot