![Article Title](https://tistory1.daumcdn.net/tistory/342254/skin/images/icon_post_title.gif)
** Conditional Compile - #if, #ifdef directives
☞ for Constant Expression
#if <Constant_expression>
...
#elif <Constant_expression>
...
#else
...
#endif
☞ for Identifier (1)
#ifdef <identifier>
...
#elif <identifier>
...
#else
...
#endif
☞ for Identifier (2)
#if defined (identifier #1) || defined (identifier #2) || ...
...
#else
...
#endif
** Memory Access via Address defintion
#define BASE_ADDRESS (0x80000000)
#define FLAG_MARK0 (*(volatile unsigned int *) (DDR_BASE+0x00000000))
#define FLAG_MARK1 (*(volatile unsigned int *) (DDR_BASE+0x00000004))
FLAG_MARK0 &= ~(0x1 << 4 ); // clear bit[4]
FLAG_MARK1 |= (0x1 << 5 ); // set bit[5]
cf. 'volatile' definition for pointer
volatile int* foo; // The address of pointer is volatile
int volatile *foo; //
int * volatile foo; // The value of the pointer is volatile
int volatile * volatile foo; // pointer & the value of pointer are volatile
** Variable Declaration & Assignment
- Variables can be declared either within a function or outside a fucnition -> Scope, Lifetime
- Variables shall be assigned within a function except for initial assigment
** OR Operation
- It's recommended that '|=' follow '&= ~(*)' : Clear bit fields before OR operation