Look at this long expression of function declaration
extern FUNC( Std_ReturnType, FEE_CODE ) Fee_Write(
VAR( uint16, AUTOMATIC ) BlockNumber,
P2VAR( uint8, AUTOMATIC, FEE_APPL_DATA ) DataBufferPtr);
There are four macro in this expression: FUNC, VAR, P2VAR, Std_ReturnType, these definition
/*
*
@Violates @贴吧用户_007CeS5🐾 Compiler_h_REF_4 In the definition of a function-like macro each instance of a
* parameter shall be enclosed in parentheses
*/
#define FUNC(rettype, memclass) rettype
/*
* @violates @ref Compiler_h_REF_4 In the definition of a function-like macro each instance of a
* parameter shall be enclosed in parentheses
*/
#define VAR(vartype, memclass) vartype
/*
* @violates @ref Compiler_h_REF_4 In the definition of a function-like macro each instance of a
* parameter shall be enclosed in parentheses
*/
#define P2VAR(ptrtype, memclass, ptrclass) ptrtype *
/**
*
@Brief This type can be used as standard API return type which is shared between the RTE and the
* BSW modules.
*
@implements DBASE12002
*/
typedef uint8 Std_ReturnType;
So the long declaration expression should look like this after precompile :
extern uint8 Fee_Write(uint16 BlockNumber, uint8* DataBufferPtr);
It’s simple, So don’t be scared by the long expression.
PS: AUTOSAR <Specification of Compiler Abstraction> defined how to implement the Complier.h file.