This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

AM2634: I2C Configuration Instance Names Are Hardcoded in Enet

Part Number: AM2634
Other Parts Discussed in Thread: SYSCONFIG

Tool/software:

This is not a serious problem but the function EnetBoard_setMacPort2IOExpanderCfg() in example 'enet_lwip_cpsw_am263x-cc_r5fss0-0_freertos_ti-arm-clang' is dependent on two I2C configurations for arguments to I2C_transfer().

    buffer[0] = IO_EXPANDER_PORT0_OUTPUT_REG + 1; /* Port 1 */
    buffer[1] = (0x01 << 4); /* Pin 4 */
    I2C_transfer(I2C_getHandle(CONFIG_I2C1), &i2cTransaction);

The macro 'CONFIG_I2C1' on line 3 is hardcoded. If the I2C configuration name is changed to say 'CONFIG_I2C2', the project won't build.

In keeping with other modules, e.g.CAN, dependent generated SYSCONFIG code should adapt to arbitrarily named configuration instances in my view. Is there a reason it can't in this case please?