The configurator creates the g_i2c_cfg structure in flash. If you want to change something in that configuration at runtime, you need to make a copy of that structure in RAM so that you can change the member you want to change. Then, close the I2C port and reopen it using your modified configuration structure instead of the usual one.
↧