12.07.2015 Views

Delcom DLL Manual - Delcom Products Inc.

Delcom DLL Manual - Delcom Products Inc.

Delcom DLL Manual - Delcom Products Inc.

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

SPI Commands<strong>Delcom</strong>SPIWrite – This function writes up to 64 bits of data to the SPI port. Set clock count variable tothe number bits to write and the DataExt to the data to write.C: DWORD <strong>Delcom</strong>SPIWrite(HANDLE hUsb, BYTE ClockCount, LPSTR DataExt );VB: Public Declare Function <strong>Delcom</strong>SPIWrite Lib "<strong>Delcom</strong><strong>DLL</strong>.dll" _(ByVal DeviceHandle As Long, , ByVal ClockCount As Byte, ByRef DataExt As DataExtStructure) As Long<strong>Delcom</strong>SPISetClock – This function sets the SPI clock period size.Set ClockPeriod variable to adjust the SPI clock period.C: DWORD <strong>Delcom</strong>SPISetClock(HANDLE hUsb, BYTE ClockPeriod,);VB: Public Declare Function <strong>Delcom</strong>SPISetClock Lib "<strong>Delcom</strong><strong>DLL</strong>.dll" _(ByVal DeviceHandle As Long, , ByVal ClockPeriod As Byte) As Long<strong>Delcom</strong>SPIRead – This function returns the read data from the last SPI write function sent.Data is returned in the DataExt variable.C: DWORD <strong>Delcom</strong>SPIRead(HANDLE hUsb, LPSTR DataExt );VB: Public Declare Function <strong>Delcom</strong>SPIRead Lib "<strong>Delcom</strong><strong>DLL</strong>.dll" _(ByVal DeviceHandle As Long, ByRef DataExt As DataExtStructure) As Long<strong>Delcom</strong>SPIWr8Read64 – This function writes one byte (8bits) and then reads up to 64 bits of return datafrom the SPI port. Set clock count variable to the number bits to read, set the WrData variable the bytevalue to be written and the read data will be returned in the DataExt variable.C: DWORD <strong>Delcom</strong>SPIWr8Read64(HANDLE hUsb, BYTE WrData, BYTE ClockCount, LPSTR DataExt );VB: Public Declare Function <strong>Delcom</strong>SPI Wr8Read64 Lib "<strong>Delcom</strong><strong>DLL</strong>.dll" _(ByVal DeviceHandle As Long, , ByVal WrData As Byte, ByVal ClockCount As Byte, ByRef DataExt As DataExtStructure)As Long<strong>Delcom</strong> <strong>DLL</strong> <strong>Manual</strong> 16 of 21 June 9, 2011 Ver 1.1

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!