我正在使用SpiDev模块(https://github.com/doceme/py-spidev)控制Raspberry Pi上的Texas Instruments ADS1261EVM(并使用Python编程)
当我发送存储为变量的消息时,xfer2函数似乎会改变发送的消息变量
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]
为什么变量send在收到时会被覆盖
有一个bug报告:https://github.com/doceme/py-spidev/issues/61
相关问题 更多 >
编程相关推荐