Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

This is to avoid multiple definitions, and to ensure that the ifndef checks a unique identifier.

File Includes


Code Block
/** @addtogroup XXX_API XXX Public API

...


* Description.

...


* @{

...


*/

...



/*****************************************************************************

...


* STANDARD INCLUDE FILES

...


*****************************************************************************/

...


#include <stdint.h>

...



/*****************************************************************************

...


* PROJECT-SPECIFIC INCLUDE FILES

...


*****************************************************************************/

...


//#include "xxx_misc.h"

...



#ifdef __cplusplus

...


extern "C"

...


{

...


#endif


Functions

Every function should have a function banner as follows :

/* XXX_function name : . */


Code Block
/**

...


* Description.

...

 Briefly describe what the function does

...


*  Parameters :

...

 List all function parameters and provide a description of each parameter along * with the type of the parameter.

...



* (A table with parameter Name, Description, And * Type may be created for *clarity.)

...



* @param[in] arg1 Some argument.

...


...


* @return The status of the operation.

...


* @retval XXX_OK if successful.

...


* @retval XXX_ERR_NOTINIT if the module was not initialised. 

...


* @retval XXX_ERR_BADPARAM if a bad parameter was supplied.

...


...


* @execution Synchronous.

...


* @sideeffect None.

...


*

...


* @note This function must not suspend and must not invoke any blocking system 

...


* calls. It should probably just send a message to a driver event handler task. 

...


*

...


* @see XXX_SomeOtherFunction.

...


*/


Visual Impact

Size

A printed page should be no more than 72 columns.

...