From e9ec38bcfd743707ea1a7dbe38f9d75c885d9536 Mon Sep 17 00:00:00 2001 From: Ronald Caesar Date: Fri, 9 Jan 2026 18:20:07 -0400 Subject: [PATCH] docs: add template files These template files come from the Barr C style guide. Signed-off-by: Ronald Caesar --- docs/header_template.h | 23 +++++++++++++++++++++++ docs/source_template.c | 27 +++++++++++++++++++++++++++ 2 files changed, 50 insertions(+) create mode 100644 docs/header_template.h create mode 100644 docs/source_template.c diff --git a/docs/header_template.h b/docs/header_template.h new file mode 100644 index 0000000..65729cf --- /dev/null +++ b/docs/header_template.h @@ -0,0 +1,23 @@ +/** @file module.h + * + * @brief A description of the module’s 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 ***/ diff --git a/docs/source_template.c b/docs/source_template.c new file mode 100644 index 0000000..b08c4e6 --- /dev/null +++ b/docs/source_template.c @@ -0,0 +1,27 @@ +/** @file module.c + * + * @brief A description of the module’s purpose. + * + * @par + */ + +#include +#include + +#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 ***/