;

연암과 다산 사이

블로그 이미지
문패 달고 보니까 넘 커다란 이름이네요 ^^; 행여 고래 등 사이에 끼인 새우가 되지 않기를 ㅎㅎ 연암은 고미숙님의 '열하일기, 웃음과 역설의 유쾌한 시공간'에서, 다산은 '다산연구소' (http://www.edasan.org)에서 삘 받았슴다. 잼난 놀이터가 되었으면... ^^
by 명랑만화
  • Total hit
  • Today hit
  • Yesterday hit
02-08 00:04

** 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



AND

ARTICLE CATEGORY

분류 전체보기 (4477)
올드Boy다이어리 (532)
올드Boy@Jeju (83)
올드Boy@Road (131)
올드Boy@Book (58)
숨은길찾기 (14)
스펙트럼 (105)
우물밖엿보기 (32)
교회에말걸기 (226)
이어지는글들 (52)
하하호호히히 (75)
어?...아하! (126)
대한늬우스 (1673)
세계는지금 (268)
차한잔의여유 (64)
La Vita E Bella (230)
좋은나라만들기 (92)
트위터세상 (67)
사람&말 (625)
호모파베르 (20)

RECENT ARTICLE

RECENT COMMENT

RECENT TRACKBACK

CALENDAR

«   2025/02   »
1
2 3 4 5 6 7 8
9 10 11 12 13 14 15
16 17 18 19 20 21 22
23 24 25 26 27 28

ARCHIVE