I am using the SpiDev module (https://github.com/doceme/py-spidev) to control a Texas Instruments ADS1261EVM on my Raspberry Pi (and programming in Python).
When I send a message stored as a variable, the xfer2 function seems to alter the message variable sent.
import spidev
spi = spidev.SpiDev()
spi.open(0,0)
send = [0x20,0x0,0x0]
print (send) # to verify that the message is [0x20,0x0,0x0]
received = spi.xfer2(send)
print(send, received) # prints [received] [received]
Why does the variable send appear to be overwritten when received?
There's a bug report for that: https://github.com/doceme/py-spidev/issues/61