Вы здесь

DlnSpiSlaveSetFrameSize() Function

The DlnSpiSlaveSetFrameSize() function sets the size of a single SPI data frame.

Syntax
C/C++
DLN_RESULT DlnSpiSlaveSetFrameSize(
   HDLN handle,
   uint8_t port,
   uint8_t frameSize
);
Parameters
handle

A handle to the DLN-series adapter.

port

A number of the SPI slave port.

frameSize

A number of bits to be transmitted during the single frame. The DLN-series adapter supports 8 to 16 bits per frame.

The frameSize parameter does not limit the size of the buffer transmitted to/from the SPI slave device, it only defines the minimum portion of data in this buffer.

Return Value
DLN_RES_SUCCESS (0x00)

The function successfully specified the frame size.

DLN_RES_INVALID_PORT_NUMBER (0xA8)

The port number is not valid. Use the DlnSpiSlaveGetPortCount() function to find the maximum possible port number.

DLN_RES_SPI_INVALID_FRAME_SIZE (0xB8)

The frame size is not valid. The DLN-series adapters support 8 to 16 bits per transmission.

DLN_RES_BUSY (0xB6)

The SPI slave is busy transmitting. The frame size cannot be changed.

Remarks

The DlnSpiSlaveSetFrameSize() function is defined in the dln_spi_slave.h file.

Языки

Вход на сайт