|
From: | E. Weddington |
Subject: | Re: [avr-gcc-list] "Volatile" |
Date: | Fri, 15 Apr 2005 15:48:54 -0600 |
User-agent: | Mozilla Thunderbird 1.0.2 (Windows/20050317) |
Keith Gudger wrote:
So I guess this is sort of my question: You cast a variable as "volatile" when it could possibly change in an interrupt. This forces the compiler to read it from RAM whenever it's used, and not use a register to store it. Is there a corresponding "cast" or anything that would force the compiler to _cli & _sei around any change in a variable? Or is it up to my (forgetful) self? Thanks.
It's up to you. Sorry. :-( Eric
[Prev in Thread] | Current Thread | [Next in Thread] |