Small Question regarding the deprecated I2C Library: How to set up I2C Channel?

Hello,

Can you please tell what parameters are suitable for I2CRegAddr in
BOOL I2CInitEx ( DWORD I2CRegAddr ) ?

https://developer.toradex.com/knowledge-base/i2c-lib-api#ae62a1f8c4ac4afbf095e7faa035158a6

I would like to use I2C3 (Since this is the only other I2C which is accessible on the Ixora Board.

Have a nice Weekend,
Best Regards,
Stefan

Dear @Stefan.P,

Please refer below code for possible values of I2CRegAddr to pass to I2cInitEx for the Tegra platform.

switch (I2CRegAddr)
{
case 0x7000c000: i2c_channel = 1; break;    // I2C1
case 0x7000c400: i2c_channel = 2; break;    // I2C2
case 0x7000c500: i2c_channel = 3; break;    // I2C3
case 0x7000c700: i2c_channel = 4; break;    // I2C4 (T30 only)
case 0x7000d000: i2c_channel = 5; break;    // I2C5 (T30 only) = DVC
default:         ASSERT(FALSE);
}
    
e.g.: I2CInitEx(0x7000C500) // I2C_3

We have new Toradex CE libraries, there these things are handled internally inside the library and you just need to pass I2c channel to the I2c_Init function, please refer Toradex_CE_Libraries.chm documentation and libDemos for demo applications.

Please feel free to contact us if you have any other questions.

Thank you. I will test this. Unfortunately we have some “older” code using the old library. The conversion to the new Library is not yet finished/not going well.

Best Regards, Stefan