Open bauergeorg opened 2 years ago
I found a solution to convert a hex value into a binary with padded zeros:
def hex_to_bits(value:str, length=None, padded_zeros=True) -> str:
if length == None:
length = len(value)*4
ret = bin(int(value,16))[2:]
if padded_zeros == True:
ret = ret.rjust(length, '0')
return ret
Hi I found the following bug:
The output is a litte bit confusing...
I think this is the same issue like: https://github.com/eblot/pyftdi/issues/245