Вы здесь

DlnI2cSlaveLoadReply() Function

The DlnI2cSlaveLoadReply() function loads data to be transferred to an I2C master device.

Syntax
C/C++
DLN_RESULT DlnI2cSlaveLoadReply(
   HDLN handle,
   uint8_t port,
   uint16_t size,
   uint8_t* buffer
);
Parameters
handle

A handle to the DLN-series adapter.

port

A number of the I2C slave port.

size

A size of the data buffer to be loaded. The size is specified as a number bytes and can vary from 1 to 256.

buffer

A pointer to an array of unsigned 8-bit integers that receives data to be sent to an I2C master. The size of the buffer is specified in the size parameter.

Return Value
DLN_RES_SUCCESS (0x00)

The function successfully loaded data to the buffer.

DLN_RES_INVALID_PORT_NUMBER (0xA8)

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

DLN_RES_BUSY (0xB6)

The function cannot specify I2C slave addresses for the DLN adapter while the I2C slave port is busy transmitting data.

DLN_RES_INVALID_BUFFER_SIZE (0xAE)

The specified buffer size is not valid.

Remarks

The DlnI2cSlaveLoadReply() function is defined in the dln_i2c_slave.h file.

Языки

Вход на сайт