iLLD_TC27xD
1.0
|
This section provides the naming convention to be followed during development.
As general rule all the "exported" types/definitions/class/objects (i.e. Function, enum, typedef, constant, variable, ...) should start with the filename + underscore "_".
Example: in file IfxScuWdt.c/h the function shall be:
Ifx<HW Module name>[<HW Sub module name>][_SW Driver if special][sub SW module name].c/h
Example:
Important things to check during review/ or with static code check tools:
typedef <standard type> Ifx<HW Module name>[<HW Sub module name>][SW Driver if special]<user type name>;
<Standard type> structure/union/enum definitions with its elements, and other C data types
Example:
Important things to check:
To define structure types the convention shall be followed as in type defines above.
For structure elements simple name with camel case letters with first letter small shall be used.
Refer to the example for naming convention for type defines
To define enum types the convention shall be followed as in type defines above.
For enum elements following naming convention to be followed:
Ifx<HW Module name>[<HW Sub module name>][SW Driver if special]<Enum Name>_<Enum element>
<Enum element> camel case letter <Enum Name> Camel case letter
Example:
Important things to check:
#define IFX<MODULE>[<HW SUB MODULE NAME>][SW DRIVER]<FUNCTIONALITY NAME>
<FUNCTIONALITY NAME>: Meaningful name to represent the functionality. With "_" to separate words
Example:
Important things to check:
All exported functions: Ifx<HW Module name>[<HW Sub module name>][SW Driver if special]<Functionality>
Example:
Important things to check:
For example:
Function parameter are not doing an action done but does set values for confiuguration, then there is no verb in the name.
Examples:
All inline functions as:
IFX_INLINE <function definition>
Shall follow the naming conventions as in Functions
Located in Cpu/Std/Platform_Types.h