Вы здесь

DlnI2cSlaveGetAddress() Function

The DlnI2cSlaveGetAddress() function retrieves one of the I2C slave addresses, assigned to the specified I2C slave module. The total number of simultaneously assigned addresses can be retrieved with the DlnI2cSlaveGetAddressCount() function.

Syntax
C/C++
DLN_RESULT DlnI2cSlaveGetAddress(
   HDLN handle,
   uint8_t port,
   uint8_t slaveAddressNumber,
   uint8_t* address
);
Parameters
handle

A handle to the DLN-series adapter.

port

A number of the I2C slave port.

slaveAddressNumber

A number of the I2C slave address to be retrieved. The slaveAddressNumber value can be in the range from 0 up to (but not including) the value returned by the DlnI2cSlaveGetAddressCount() function.

address

A pointer to an unsigned 8-bit integer that receives the I2C slave address.

Return Value
DLN_RES_SUCCESS (0x00)

The function successfully retrieved the I2C slave address.

DLN_RES_INVALID_PORT_NUMBER (0xA8)

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

Remarks

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

Языки

Вход на сайт