cancel
Showing results for 
Search instead for 
Did you mean: 

variable sharing across multiple .c files

Yoshimitsu_Manji_clan
Associate II

Good evening all community members,

I am using STM32F4 board. My current project has multiple .c files to have a modular approach. ADC files is working on its own interrupt and another file called gpio file working on timer2 interrupt. I got a sensor's value from ADC  and i want to use this value in gpio file. Trying my best, i am not able to share adc variable's data to gpio file. Request if someone could guide me what is it that I am doing wrong here??

regards and thanks...!

 

1 REPLY 1

This is standard C - not specific to STM32:

https://community.st.com/t5/stm32cubeide-mcus/adding-new-c-source-files-to-my-project-and-navigating-through/m-p/657455/highlight/true#M25847

 

A complex system that works is invariably found to have evolved from a simple system that worked.
A complex system designed from scratch never works and cannot be patched up to make it work.