docs: add template files

These template files come from the Barr C style guide.

Signed-off-by: Ronald Caesar <github43132@proton.me>
This commit is contained in:
Ronald Caesar
2026-01-09 18:20:07 -04:00
parent 6cf4df24bf
commit e9ec38bcfd
2 changed files with 50 additions and 0 deletions

23
docs/header_template.h Normal file
View File

@@ -0,0 +1,23 @@
/** @file module.h
*
* @brief A description of the modules purpose.
*
* @par
*/
#ifndef MODULE_H
#define MODULE_H
/*!
* @brief Identify the larger of two 8-bit integers.
*
* @param[in] num1 The first number to be compared.
* @param[in] num2 The second number to be compared.
*
* @return The value of the larger number.
*/
int8_t max8(int8_t num1, int8_t num2);
#endif /* MODULE_H */
/*** end of file ***/

27
docs/source_template.c Normal file
View File

@@ -0,0 +1,27 @@
/** @file module.c
*
* @brief A description of the modules purpose.
*
* @par
*/
#include <stdint.h>
#include <stdbool.h>
#include “module.h”
/*!
* @brief Identify the larger of two 8-bit integers.
*
* @param[in] num1 The first number to be compared.
* @param[in] num2 The second number to be compared.
*
* @return The value of the larger number.
*/
int8_t
max8 (int8_t num1, int8_t num2)
{
return ((num1 > num2) ? num1 : num2);
}
/*** end of file ***/