![Ratoc Systems REX-USB61 User Manual Download Page 68](http://html.mh-extra.com/html/ratoc-systems/rex-usb61/rex-usb61_user-manual_788102068.webp)
4. API function reference
Page.4-23
VC
RS_STATUS
usb61_spi_transmit_master_hold_ss( HANDLE hUsb61Device,
RS_SPI_SS fSlaveSelect, USHORT TransmitSize,
UCHAR *pSendBuf, UCHAR *pRecvBuf );
VB
Function
Usb61SpiTransmitMasterHoldSS( ByVal hUsb61Device As Long,
ByVal fSlaveSelect As Integer, ByVal TransmitSize As Integer,
ByVal pSendBuf As Byte, pRecvBuf As Byte) As Long
Definition
VB.NET
Function
Usb61SpiTransmitMasterHoldSS( ByVal hUsb61Device As Integer,
ByVal fSlaveSelect As Short, ByVal transmitSize As Short,
ByVal pSendBuf As Object, ByRef pRecvBuf As Object) As Integer
Description
Write a stream of bytes to the downstream SPI slave device and read back dummy
data.
After write, not set SS line status to High.
For setting SS line to High, call usb61_gpo_write function.
Parameters
[IN] hUsb61Device : handle of an REX-USB61 device
[IN] fSlaveSelect : Pin number for slave select
enumerated values specifying pin number the bellow:
RS_SPI_SS0 Slave select pin number 0
RS_SPI_SS1 Slave select pin number 1
RS_SPI_SS2 Slave select pin number 2
RS_SPI_SS3 Slave select pin number 3
[IN] TransmitSize : the number of bytes to write
[IN] pSendBuf : pointer to write data
[OUT] pRecvBuf : pointer to read back data
Return
Values
RS_SUCCESS Function call succeeded.
Error code (refer. 4-5) Function call failed.