Page 1 of 1
I want merge ADC(main) with I2C(main)
Posted: Thu Jun 19, 2014 3:56 pm
by Pask
I have chibistudio. It has many chibios example ready to run. I want "merge" main file of ADC example Project with main of I2C example project. I want just a single main with both function (I2C and ADC) but when i copy I2C main project's istructions to ADC main i have many errors (many constant and function unresolved)
Why?
Thanks.
Re: I want merge ADC(main) with I2C(main)
Posted: Thu Jun 19, 2014 4:12 pm
by Giovanni
Hi,
Look at the halconf.h and mcuconf.h files, there you can enable and disable the various drivers. If you add I2C to the ADC demo then you have to enable I2C driver in halconf.h and the I2C unit in mcuconf.h.
Giovanni
Re: I want merge ADC(main) with I2C(main)
Posted: Thu Jun 19, 2014 6:56 pm
by Pask
thanks a lot but don't seem to work.
I modified the following define from false to true in the ADC's mcuconf.h because i compared both mcuconf.h files (ADC and I2C)
and i found this dirrefernces
#define STM32_I2C_USE_I2C1 TRUE
#define STM32_I2C_USE_I2C2 TRUE
#define STM32_I2C_USE_I2C3 TRUE
#define STM32_SERIAL_USE_USART2 TRUE
Re: I want merge ADC(main) with I2C(main)
Posted: Thu Jun 19, 2014 7:04 pm
by Pask
Sorry. I modified halconf.h also.
Problem resolved.
Thanks so much Giovanni
