我的C.tom
下半部是網路查到的,只是覺得怪怪就先註解,改成直接copy source code裡面的定義:
Compiler.h (BSW\_Common)
; AUTOSAR
FUNC(rettype, memclass) rettype memclass
P2VAR(ptrtype, memclass, ptrclass) memclass ptrtype ptrclass *
P2CONST(ptrtype, memclass, ptrclass) const memclass ptrtype ptrclass *
CONSTP2VAR(ptrtype, memclass, ptrclass) memclass ptrtype ptrclass * const
CONSTP2CONST(ptrtype, memclass, ptrclass) const memclass ptrtype ptrclass * const
P2FUNC(rettype, ptrclass, fctname) rettype (ptrclass * fctname)
CONST(type, memclass) const type memclass
VAR(vartype, memclass) vartype memclass
CONSTP2FUNC(rettype, ptrclass, fctname) rettype (ptrclass * const fctname)
FUNC_P2CONST(rettype, ptrclass, memclass) const rettype ptrclass * memclass
FUNC_P2VAR(rettype, ptrclass, memclass) rettype ptrclass * memclass
OS_FUNC_ATTRIBUTE_DEFINITION(rettype, memclass, attribute, functionName, arguments) attribute FUNC(rettype, memclass) functionName arguments
;FUNC(rettype, memclass) rettype
;P2VAR(ptrtype, memclass, ptrclass) ptrtype *
;P2CONST(ptrtype, memclass, ptrclass) const ptrtype *
;CONSTP2VAR(ptrtype, memclass, ptrclass) ptrtype * const
;CONSTP2CONST(ptrtype, memclass, ptrclass) const ptrtype * const
;P2FUNC(rettype, ptrclass, fctname) rettype (*fctname)
;CONST(consttype, memclass) const consttype
;VAR(vartype, memclass) vartype
;CONSTP2FUNC(rettype, ptrclass, fctname) rettype (* const fctname)
;FUNC_P2CONST(rettype, ptrclass, memclass) const ptrclass rettype * memclass
;FUNC_P2VAR(rettype, ptrclass, memclass) ptrclass rettype * memclass
沒有留言:
張貼留言