Вы здесь

DlnI2cSlaveIsEnabled() Function

The DlnI2cSlaveIsEnabled() function checks whether the specified I2C slave port is active or not.

Syntax
C/C++
DLN_RESULT DlnI2cSlaveIsEnabled(
  HDLN handle,
  uint8_t port,
  uint8_t* enabled
);
Parameters
handle

A handle to the DLN-series adapter.

port

A number of the I2C slave port.

enabled

A pointer to an unsigned 8-bit integer that receives information whether the specified I2C slave port is active or not. There are two possible values:

  • DLN_I2C_SLAVE_DISABLED (0) - The I2C slave port is inactive.

  • DLN_I2C_SLAVE_ENABLED (1) - The I2C slave port is active.

Return Value
DLN_RES_SUCCESS (0x00)

The function successfully retrieved information.

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 DlnI2cSlaveIsEnabled() function is defined in the dln_i2c_slave.h file.

Языки

Вход на сайт