Word:
#define Word_Reg (*(volatile unsigned long *)0x12345678)
Half-Word:
#define HW_Reg (*(volatile unsigned int *)0x876543219)
Char:
#define C_Reg (*(volatile unsigned char *)0xabcd1234)
....simple life
#define Word_Reg (*(volatile unsigned long *)0x12345678)
#define HW_Reg (*(volatile unsigned int *)0x876543219)
#define C_Reg (*(volatile unsigned char *)0xabcd1234)
#ifdef DEBUG_STRING
#define DPRINTSTR(args...) printf(##args)
#else
#define DPRINTSTR(args...)
#endif
一些 C Macro 的技巧 (Part I:不定變數)
一些 C Macro 的技巧 (Part II:將傳入的參數變成字串)
一些 C Macro 的技巧 (Part III:將傳入的參數名稱變化)
Variadic macro
起初,他們捉共產黨員,我不說話,因為我不是共產黨員;
後來,他們捉工會會員,我不說話,因為我沒有參加工會;
後來,他們捉猶太人, 我不說話,因為我是日耳曼人;
後來,他們捉天主教徒,我還是不說話,因為我是新教徒;
最後,等到他們來捉我時,已經沒有人能為我說話了..
about PGO :
Profile-guided Optimizations Overview
Firefox 3 with Profile-Guided Optimization = Speeding ticket
Building with Profile-Guided Optimization
eth0 : 對外網卡使用固定ip
eth1 : 對內網卡使用class c ip : 192.168.1.1
auto lo
iface lo inet loopbackauto eth0
iface eth0 inet static
address 140.118.x.x
netmask 255.255.255.0
gateway 140.118.202.254auto eth1
iface eth1 inet static
address 192.168.1.1
netmask 255.255.255.0
subnet 192.168.1.0 netmask 255.255.255.0 {
option routers 192.168.1.1;
option subnet-mask 255.255.255.0;
option domain-name-servers 140.118.2.53;
option ip-forwarding off;
range dynamic-bootp 192.168.1.100 192.168.1.200;
default-lease-time 21600;
max-lease-time 43200;
}2009 All Rights Reserved All About My Life.
Blogger Templates created by Deluxe Templates • Wordpress designed by Acosmin