KnowledgeHub
Questions
Tags
Users
Search
Alex Rivera
|
Logout
Edit Question
Title
Body
I have used a static global variable and a static volatile variable in file scope, both are updated by an ISR and a main loop and main loop checks the value of the variable. here during optimization neither the global variable nor the volatile variable are optimized. So instead of using a volatile variable a global variable solves the problem. So is it good to use global variable instead of volatile? Any specific reason to use static volatile?? Any example program would be appreciable. Thanks in advance..
Tags (comma-separated)
Save Edits
Cancel