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.
I want merge ADC(main) with I2C(main)
Moderator: RoccoMarco
- Giovanni
- Site Admin
- Posts: 14892
- Joined: Wed May 27, 2009 8:48 am
- Has thanked: 1202 times
- Been thanked: 996 times
Re: I want merge ADC(main) with I2C(main)
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
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)
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
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)
Sorry. I modified halconf.h also.
Problem resolved.
Thanks so much Giovanni
Problem resolved.
Thanks so much Giovanni