C语言:头文件和源文件模版
template.h
/*
* @Description:
* @Author:
* @version:
* @Date:
* @LastEditors:
* @LastEditTime:
*/
#ifndef __xxx_H__
#define __xxx_H
//==============================================================================
// Include files
#ifdef __cplusplus
extern "C" {
#endif
//==============================================================================
// Constants
#define MAX(a,b) ((a)>(b) ? (a):(b))
#define MIN(a,b) ((a)<(b) ? (a):(b))
//==============================================================================
// types
//==============================================================================
// global varibles
//==============================================================================
// global functions
/**
* @brief function description
*
* @attention xxxx
*
* @param[in] input xxxxx
*
* @param[out] output xxxxx
*
* @return
* - OK: succeed
* - ERR: xxxxx
*/
#ifdef __cplusplus
}
#endif
#endif
template.c
//==============================================================================
// Include files
//==============================================================================
// Constants
//==============================================================================
// types
//==============================================================================
// global varibles
//==============================================================================
// static varibles
//==============================================================================
// global functions
//==============================================================================
// static functions
//==============================================================================
// The main entry-point function.
int main(int argc, char *argv[])
{
return 0;
}