DlnI2cMasterWrite() Function
DLN_RESULT DlnI2cMasterWrite(
HDLN handle,
uint8_t port,
uint8_t slaveDeviceAddress,
uint8_t memoryAddressLength,
uint32_t memoryAddress,
uint16_t bufferLength,
uint8_t* buffer
);
The DlnI2cMasterWrite() function sends data via I2C interface from the DLN-series adapter to the specified I2C slave device.
Parameters:
- handle
- A handle to the DLN-series adapter.
- port
- A number of the I2C master port to be used.
- slaveDeviceAddress
- A 7-bit number, uniquely assigned to each I2C slave device. See I2C address section for additional information.
- memoryAddressLength
- Must contain an internal address length. If set to zero, no internal address is sent.
- memoryAddress
- An internal I2C slave device address.
- bufferLength
- The size of the message buffer in bytes. This value must fall within a range from 1 to 256.
- buffer
- A pointer to an array of unsigned 8-bit integers. The buffer must contain the information to be sent to a slave during the function execution. The buffer size must not exceed 256 bytes.
This function is defined in the dln_i2c_master.h file.
2006-2012