Вы здесь

DlnI2cMasterIsEnabled() Function

The DlnI2cMasterIsEnabled() function checks whether the specified I2C master port is active or not.

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

A handle to the DLN-series adapter.

port

A number of the I2C master port.

enabled

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

  • DLN_I2C_MASTER_DISABLED (0) - The port is not configured as an I2C master.

  • DLN_I2C_MASTER_ENABLED (1) - The port is configured as an I2C master.

Return Value
DLN_RES_SUCCESS (0x00)

The function retrieved the state of the I2C master port successfully.

DLN_RES_INVALID_PORT_NUMBER (0xA8)

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

Remarks

The DlnI2cMasterIsEnabled() function is defined in the dln_i2c_master.h file.

Языки

Вход на сайт