end
local nRC, hHandle = SPIOpenDevice("192.168.1.254", 5000)
if nRC == 0 then
local tabRead
// send 1 byte and receive 1 byte
nRC, tabRead = LS_SPIDataReq(hHandle, tabWrite, 1, 1)
// send 1 byte and receive 5 byte
nRC, tabRead = LS_SPIDataReq(hHandle, tabWrite, 1, 5)
// send 2 byte and receive 1 byte
nRC, tabRead = LS_SPIDataReq(hHandle, tabWrite, 2, 1)
LS_SPICloseDevice(hHandle)
end
SPI Funktionen
142
© 2007-2015 Analytica GmbH