Atollic variables
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2013-06-03 01:42 AM
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
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2013-06-03 04:02 AM
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..
Up vote any posts that you find helpful, it shows what's working..
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2013-06-03 06:29 AM
Posted on June 03, 2013 at 15:29
Ok, thanks, it's running !!!