Correction in the last input line...
In [16]: result = struct.unpack('5p', os_inst[11:16])
---
error Traceback (most recent call last)
in ()
> 1 result = struct.unpack('5p', os_inst[11
Thanks for your reply Ned!
I tried this your suggestion and this is what it complains...
os_inst_bytes = struct.pack('7BI512s', 0, 0x51, 0x10, 5, 0, 0xD, 0x80, 0, '')
---
error
Traceback
Hello,
I am trying to build a structure to be passed down to an I2C device driver. The
driver expects a struct that has a data array of size 512 bytes among other
things. This is my code -
rd_wr = 0x0 # Read operation
i2c_addr= addr
mux = mux_sel
multi_len
I am trying to use os.open() and os.lseek() methods to operate on a device file
in Linux. My code goes something like this -
# first, open the file as a plain binary
try:
self.file = open(/dev/relpcfpga, "r+b", buffering=0)
except IOError:
raise IOError ('Failed to open.')
# Figu