cancel
Showing results for 
Search instead for 
Did you mean: 

Atollic variables

julienlemellec9
Associate II
Posted on June 03, 2013 at 10:42

Hello, I'm currently programmed a STM32F4 Discovery with the IDE Atollic. In my program, I get two fonction, the first in the file ''stm32f4xx_it.c'' and the second in the file main.c and i want to known if i can transmit a variable betwen the two fonctions.

Sorry for my bad English !!

Thanks,

2 REPLIES 2
Posted on June 03, 2013 at 13:02

This isn't an Atollic issue, simply a C one.

Define a global variable in one of the files, and refer to it with the ''extern'' keyword in the others. For variables you change in an interrupt consider also the ''volatile'' keyword.

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..
julienlemellec9
Associate II
Posted on June 03, 2013 at 15:29

Ok, thanks, it's running !!!