Hi,
I'm trying to add I2C support. For this I need to enable the clock for instance. With a 32K limited platform, what is the best approach?
I cannot recompile and debug the whole circleOS due to size limitation and debug wish. So, I cannot just change the scheduler.c function RCC_Configuration() for instance.
Then, I was thinking doing all the config I need in Application.c.
so, I would have in:
scheduler.c (original file)
RCC_APB1PeriphClockCmd( RCC_APB1Periph_TIM2, ENABLE );
And in Application.c (extract), I would have:
/* I2C2 CLOCK -----------------------------------------------------*/
RCC_APB1PeriphClockCmd( RCC_APB1Periph_I2C2, ENABLE );
/* I2C2 GPIO HW config -----------------------------------------------------*/
/* Configure I2C2 pins: SCL and SDA */
GPIO_InitTypeDef GPIO_InitStructureI2C2;
GPIO_InitStructureI2C2.GPIO_Pin = GPIO_Pin_10| GPIO_Pin_11;
GPIO_InitStructureI2C2.GPIO_Speed = GPIO_Speed_50MHz;
GPIO_InitStructureI2C2.GPIO_Mode = GPIO_Mode_AF_OD;
GPIO_Init(GPIOB, &GPIO_InitStructureI2C2);
I wanted to check with you if this was a good way to add the changes?
Thank you very much,