I have a .c library which I want to use through my python code. The c function that I am calling is:
Code: Select all
crc32Word(uint32_t crc, const void *buffer, uint32_t size)
But when I write in my python code as follows:
Code: Select all
for x in range(1):
spi.xfer2(data)
values = struct.unpack("<" +"I"*256, bytes(data))
C = crc.crc32Word(0xffffffff,data,1024)
I get error as
Code: Select all
<class 'typeerror'>: don't know how to convert parameter 2