iLLD_TC27xD  1.0
Naming convention

Enumerated Types

[link: Enumerated Types]

   Enumeration items must be prefixed with the enumeration type.

   Correct:

Wrong (IfxDma_ChannelPrioritySelect):

typedef enum
{
} IfxDma_ChannelPrioritySelect;

Directory name

[link: Directory name]

   Dirtectory shall have the same name as the driver name without the Ifx prefix.

       Correct:
       - Dma
           - Dma
               - IfxDma.c
               - IfxDma.h

       Wrong:
       - Dma
           - <SPAN style="color:red">Interface</SPAN>
               - IfxDma.c
               - IfxDma.h

Function's parameter & struct members

[link: Function's parameter & struct members]

Function parameter are not doing an action done but does set values for confiuguration, then there is no verb in the name.

Correct:

typedef struct
{
boolean hardwareRequestEnabled; // \brief Enabling the hardware channel request

Wrong(enableHardwareRequest):

typedef struct
{
boolean enableHardwareRequest; // \brief Enabling the hardware channel request

Static function names shall also be prefixed

[link: Static function names shall also be prefixed]

Correct:
static void IfxDma_Dma_configureTransactionSet(Ifx_DMA_CH* channel, IfxDma_Dma_ChannelConfig* config)

Wrong:

static void configureTransactionSet(Ifx_DMA_CH* channel, IfxDma_Dma_ChannelConfig* config)

Do not explicitely use 'handle' in the parameter name

[link: Do not explicitely use 'handle' in the parameter name]

Remove the name ‘handle’ from the parameter’s name, even we hnow that it is an handle. It does not add information but increase the source code length.

Correct:

Wrong(dmaHandle):

[Previous page] [Next page]