DlnI2cMasterScanDevices() Function

 DLN_RESULT DlnI2cMasterScanDevices(
    HDLN handle,
    uint8_t port,
    uint8_t* addressCount,
    uint8_t* addressList
 );

The DlnI2cMasterScanDevices() function scans all the 127 slave addresses searching for connected I2C slave devices.

Parameters:

handle
A handle to the DLN-series adapter.
port
A number of the I2C master port scan for I2C slave devices.
addressCount
A pointer to an unsigned 8-bit integer. The integer will be filled with the number of found I2C slave devices after the function execution.
addressList
A pointer to an array of unsigned 8-bit integers. The array will contain the addresses of found I2C slave devices after the function execution. I2C address is 7-bit long, so the most significant bit of the received integers will always be equal to zero. Some vendors specify the 8-bit addresses in their documentation. If you need to convert a 8-bit I2C address to 7-bit address, take a look at I2C address article.

This function is defined in the dln_i2c_master.h file.