DLN_RESULT DlnI2cSlaveSetEvent( HDLN handle, uint8_t port, uint8_t slaveAddressNumber, uint8_t eventType, );
I2C slave events can be different for different I2C slave addresses. Specify the number of the I2C slave address in slaveAddressNumber parameter.
- A handle to the DLN-series adapter.
- A number of the I2C slave port to be configured.
- A number of the I2C slave address. The slaveAddressNumber parameter is zero base. Possible value are from zero up to (but not including) the value returned by the DlnI2cSlaveGetAddressCount() function.
A condition for I2C slave event generation . The following values are available:
I2C_SLAVE_EVENT_NONE (0) no I2C slave events are generated I2C_SLAVE_EVENT_READ (1) I2C slave events are generated when an I2C master device reads data from PC-I2C adapter I2C_SLAVE_EVENT_WRITE (2) I2C slave events are generated when an I2C master device writes data to PC-I2C adapter I2C_SLAVE_EVENT_READ_WRITE (1) I2C slave events are generated both for read and write transactions
This function is defined in the dln_i2c_slave.h file.