I have stm8l discovery and Can any one help with i2c configuration here. I am using LP55231 led driver and I do not know whether this configuration is correct.
Please go through the code and help me out in the configuration.void i2c_init(void) { I2C1_FREQR = 0x20;// 16mHz I2C1_CCRL = 0x50; // 160 I2C1_OARH = 0x40; // 7-bit addressing and add-mode configuration I2C1_CR1 = 0x01; // enable peripheral}void ...