- Needed For:
- Prevent optimization when reading from a memory mapped device registers
- Delay Loops
Usage :volatile int xyz;orint volatile xyz;
Note :
volatile may cause inefficient code. e.g the following codehwReg &= ~FUNCTION_MASK;instead use the following code
hwReg |= FUNCTION_BIT;
hwReg = (hwReg & ~FUNCTION_MASK) | FUNCTION_BIT;
Thursday, January 19, 2006
Volatile
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment