|
From: | Joel Swank |
Subject: | Re: [avr-gcc-list] Question about gcc preprocessing and port/pin assignments |
Date: | Wed, 08 Dec 2004 16:24:05 -0800 |
At 04:04 PM 12/8/04, Richard Urwin wrote:
If the programmer cannot protect against a problem then the compiler has to provide the tools to do it. It seems common-sense to me that that tool is 'volatile'.
The programmer can and should always protect against the problem. Hardware should always be set with a simple assignment. WOM hardware needs have an image kept in RAM and only be set from that image. WOM should never be read. They may not have even gated the R/W line in. Use a simple assignment when reading from hardware also. If you follow these simple rules you won't have to worry about how the compiler encodes complex expressions. -- Joel Swank
[Prev in Thread] | Current Thread | [Next in Thread] |