DlnI2cSlaveEnable() Function
DLN_RESULT DlnI2cSlaveEnable(
HDLN handle,
uint8_t port,
uint16_t* conflict
);
The DlnI2cSlaveEnable() function activates the specified I2C slave port at your DLN-series adapter.
Parameters:
- handle
- A handle to the DLN-series adapter.
- port
- A number of the I2C slave port to be activated.
- conflict
-
I2C bus interface requires two lines for data transmission and synchronization (SDA and SCL). If one of these lines is used by another module, PC-I2C adapter can't activate the I2C slave port.
Use the conflict parameter to determine the pin number that is currently occupied by another module. You can determine the module that uses this pin by calling the DlnGetPinCfg() function. Deactivate this module (or disconnect the pin from this module) and call the DlnI2cSlaveEnable() function once again.
The DlnI2cSlaveEnable() function can return only one conflicting pin at once. If both SCL and SDA lines are in use, you will get the number of the first one.
This function is defined in the dln_i2c_slave.h file.
2006-2012