Вы здесь

U2C_SpiReadWrite()

U2C_RESULT U2C_SpiReadWrite(
      HANDLE hDevice,
      BYTE* pOutBuffer,
      BYTE* pInBuffer,
      unsigned short Length
);

The U2C_SpiReadWrite() function shifts out (writes) and in (reads) a stream of up to 256 bytes to/from the SPI slave device.

Parameters:

hDevice

Handle to the U2C-12 device.

pOutBuffer

Pointer to the buffer containing the data to be shifted out to the SPI slave device.

pInBuffer

Pointer to the buffer that receives the data shifted in from the SPI slave device.

Length

Number of bytes to be transferred via SPI bus. Maximum value is 256.

Return values:

U2C_SUCCESS

The data was successfully transmitted via SPI bus.

U2C_HARDWARE_NOT_FOUND

U2C-12 device referenced by hDevice handle was not found.

U2C_BAD_PARAMETER

Length parameter is out of range.

Rating: 
Голосов пока нет

Языки

Вход на сайт