http://miaozl.spaces.live.com/?_c11_blogpart_blogpart=blogview&_c=blogpart&_c02_owner=1&partqs=amonth%3d2%26ayear%3d2007
C語言巨集定義技巧
1,防止一個頭檔被重複包含
#ifndef COMDEF_H
#define COMDEF_H
//頭檔內容
#endif
2,重新定義一些類型,防止由於各種平臺和編譯器的不同,而產生的類型位元組數差異,方便移植。
#ifndef COMDEF_H
#define COMDEF_H
//頭檔內容
#endif
StructureControl StructuresFurther Syntax
Arithmetic OperatorsComparison Operators
Boolean OperatorsPointer Access OperatorsBitwise Operators
Compound Operators | VariablesConstants
Data Types
ConversionVariable Scope & QualifiersUtilities | FunctionsDigital I/O
Analog I/O
Due & Zero onlyAdvanced I/OTime
MathTrigonometryCharacters
Random Numbers
Bits and BytesExternal InterruptsInterruptsCommunicationUSB (32u4 based boards and Due/Zero only) |