Compiler Specific Language Extension Header
Module: Compiler specific types / M33 IAR ARM compiler specific types
Defines
Name |
|
|---|---|
COMPILER_MAJOR_VERSION |
|
COMPILER_MINOR_VERSION |
|
COMPILER_PATCH_VERSION |
|
AUTOMATIC |
|
TYPEDEF |
|
NULL_PTR |
|
INLINE |
|
LOCAL_INLINE |
|
FUNC(rettype, memclass) |
|
FUNC_P2CONST(rettype, ptrclass, memclass) |
|
FUNC_P2VAR(rettype, ptrclass, memclass) |
|
P2VAR(ptrtype, memclass, ptrclass) |
|
P2CONST(ptrtype, memclass, ptrclass) |
|
CONSTP2VAR(ptrtype, memclass, ptrclass) |
|
CONSTP2CONST(ptrtype, memclass, ptrclass) |
|
P2FUNC(rettype, ptrclass, fctname) |
|
CONSTP2FUNC(rettype, ptrclass, fctname) |
|
CONST(consttype, memclass) |
|
VAR(vartype, memclass) |
Macros Documentation
define COMPILER_MAJOR_VERSION
#define COMPILER_MAJOR_VERSION __TI_COMPILER_MAJOR_VERSION__
Compiler version information.
TODO : Needs an update
define COMPILER_MINOR_VERSION
#define COMPILER_MINOR_VERSION __TI_COMPILER_MINOR_VERSION__
Compiler version information.
define COMPILER_PATCH_VERSION
#define COMPILER_PATCH_VERSION __TI_COMPILER_PATCH_VERSION__
Compiler version information.
define AUTOMATIC
#define AUTOMATIC
Used for the declaration of local pointers.
define TYPEDEF
#define TYPEDEF typedef
The memory class shall be used within type definitions.
define NULL_PTR
#define NULL_PTR ((void *)0x0)
Void pointer to zero definition.
define INLINE
#define INLINE __inline
Abstraction of the keyword inline.
define LOCAL_INLINE
#define LOCAL_INLINE static __inline
Abstraction of keyword inline with static scope.
define FUNC
#define FUNC(
rettype,
memclass
)
rettype
FUNC identification information.
Parameters:
rettype return type of the function
memclass classification of the function itself
The compiler abstraction shall define the FUNC macro for the declaration and definition of functions that ensures correct syntax of function declarations as required by a specific compiler.
define FUNC_P2CONST
#define FUNC_P2CONST(
rettype,
ptrclass,
memclass
)
const ptrclass rettype *
FUNC_P2CONST identification information.
Parameters:
rettype return type of the function
ptrclass defines the classification of the pointer’s distance
memclass classification of the function itself
The compiler abstraction shall define the FUNC_P2CONST macro for the declaration and definition of functions returning a pointer to a constant. This shall ensure the correct syntax of function declarations as required by a specific compiler.
define FUNC_P2VAR
#define FUNC_P2VAR(
rettype,
ptrclass,
memclass
)
ptrclass rettype *
FUNC_P2VAR identification information.
Parameters:
rettype return type of the function
ptrclass defines the classification of the pointer’s distance
memclass classification of the function itself
The compiler abstraction shall define the FUNC_P2VAR macro for the declaration and definition of functions returning a pointer to a variable. This shall ensure the correct syntax of function declarations as required by a specific compiler.
define P2VAR
#define P2VAR(
ptrtype,
memclass,
ptrclass
)
ptrtype *
P2VAR identification information.
Parameters:
ptrtype type of the referenced variable
memclass classification of the variable itself
ptrclass defines the classification of the pointer’s distance
The compiler abstraction shall define the P2VAR macro for the declaration and definition of pointers in RAM, pointing to variables. The pointer itself is modifiable (e.g. ExamplePtr++). The pointer’s target is modifiable (e.g. *ExamplePtr = 5).
define P2CONST
#define P2CONST(
ptrtype,
memclass,
ptrclass
)
const ptrtype *
P2CONST identification information.
Parameters:
ptrtype type of the referenced variable
memclass classification of the variable itself
ptrclass defines the classification of the pointer’s distance
The compiler abstraction shall define the P2CONST macro for the declaration and definition of pointers in RAM pointing to constants. The pointer itself is modifiable (e.g. ExamplePtr++). The pointer’s target is not modifiable (read only).
define CONSTP2VAR
#define CONSTP2VAR(
ptrtype,
memclass,
ptrclass
)
ptrtype *const
CONSTP2VAR identification information.
Parameters:
ptrtype type of the referenced variable
memclass classification of the variable itself
ptrclass defines the classification of the pointer’s distance
The compiler abstraction shall define the CONSTP2VAR macro for the declaration and definition of constant pointers accessing variables. The pointer itself is not modifiable (fix address). The pointer’s target is modifiable (e.g. *ExamplePtr = 18).
define CONSTP2CONST
#define CONSTP2CONST(
ptrtype,
memclass,
ptrclass
)
const ptrtype *const
CONSTP2CONST identification information.
Parameters:
ptrtype type of the referenced variable
memclass classification of the variable itself
ptrclass defines the classification of the pointer’s distance
The compiler abstraction shall define the CONSTP2CONST macro for the declaration and definition of constant pointers accessing constants. The pointer itself is not modifiable (fix address). The pointer’s target is not modifiable (read only).
define P2FUNC
#define P2FUNC(
rettype,
ptrclass,
fctname
)
rettype(*fctname)
P2FUNC identification information.
Parameters:
rettype return type of the function
ptrclass defines the classification of the pointer’s distance
fctname function name respectively name of the defined type
The compiler abstraction shall define the P2FUNC macro for the type definition of pointers to functions.
define CONSTP2FUNC
#define CONSTP2FUNC(
rettype,
ptrclass,
fctname
)
rettype(*const fctname)
CONSTP2FUNC identification information.
Parameters:
rettype return type of the function
ptrclass defines the classification of the pointer’s distance
fctname function name respectively name of the defined type
The compiler abstraction shall define the CONSTP2FUNC macro for the type definition of constant pointers to functions.
define CONST
#define CONST(
consttype,
memclass
)
const consttype
CONST identification information.
Parameters:
consttype return type of the function
memclass defines the classification of the const variable’s distance
The compiler abstraction shall define the CONST macro for the declaration and definition of constants.
define VAR
#define VAR(
vartype,
memclass
)
vartype
VAR identification information.
Parameters:
vartype return type of the function
memclass defines the classification of the variable’s distance
The compiler abstraction shall define the VAR macro for the declaration and definition of variables.