From a2708c091beb3331967dff2af9a9232744427de4 Mon Sep 17 00:00:00 2001 From: gdisirio Date: Mon, 9 Jan 2012 19:37:58 +0000 Subject: Updated all halconf.h files. git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@3777 35acf78f-673a-0410-8e92-d51de3d6d3f4 --- os/hal/include/tm.h | 28 ++++++++++++++++++-- os/hal/src/tm.c | 27 +++++++++++++++++-- os/hal/templates/halconf.h | 53 +++----------------------------------- os/hal/templates/meta/driver_lld.h | 1 - 4 files changed, 55 insertions(+), 54 deletions(-) (limited to 'os/hal') diff --git a/os/hal/include/tm.h b/os/hal/include/tm.h index 23b9255f2..002ed1ac7 100644 --- a/os/hal/include/tm.h +++ b/os/hal/include/tm.h @@ -20,7 +20,7 @@ /** * @file tm.h - * @brief Time Measurement unit header. + * @brief Time Measurement driver header. * * @addtogroup TM * @{ @@ -29,7 +29,23 @@ #ifndef _TM_H_ #define _TM_H_ -#if HAL_USE_TM +#if HAL_USE_TM || defined(__DOXYGEN__) + +/*===========================================================================*/ +/* Driver constants. */ +/*===========================================================================*/ + +/*===========================================================================*/ +/* Driver pre-compile time settings. */ +/*===========================================================================*/ + +/*===========================================================================*/ +/* Derived constants and error checks. */ +/*===========================================================================*/ + +/*===========================================================================*/ +/* Driver data structures and types. */ +/*===========================================================================*/ /** * @brief Type of a Time Measurement object. @@ -56,6 +72,10 @@ struct TimeMeasurement { halrtcnt_t best; /**< @brief Best measurement. */ }; +/*===========================================================================*/ +/* Driver macros. */ +/*===========================================================================*/ + /** * @brief Starts a measurement. * @pre The @p TimeMeasurement must be initialized. @@ -78,6 +98,10 @@ struct TimeMeasurement { */ #define tmStopMeasurement(tmp) (tmp)->stop(tmp) +/*===========================================================================*/ +/* External declarations. */ +/*===========================================================================*/ + #ifdef __cplusplus extern "C" { #endif diff --git a/os/hal/src/tm.c b/os/hal/src/tm.c index 4d1eb57b8..060a35b66 100644 --- a/os/hal/src/tm.c +++ b/os/hal/src/tm.c @@ -20,7 +20,7 @@ /** * @file tm.c - * @brief Time Measurement unit code. + * @brief Time Measurement driver code. * * @addtogroup TM * @{ @@ -29,13 +29,28 @@ #include "ch.h" #include "hal.h" -#if HAL_USE_TM +#if HAL_USE_TM || defined(__DOXYGEN__) + +/*===========================================================================*/ +/* Driver local definitions. */ +/*===========================================================================*/ + +/*===========================================================================*/ +/* Driver exported variables. */ +/*===========================================================================*/ + +/*===========================================================================*/ +/* Driver local variables. */ +/*===========================================================================*/ /** * @brief Subsystem calibration value. */ static halrtcnt_t measurement_offset; +/*===========================================================================*/ +/* Driver local functions. */ +/*===========================================================================*/ /** * @brief Starts a measurement. @@ -66,6 +81,14 @@ static void tm_stop(TimeMeasurement *tmp) { tmp->best = tmp->last; } +/*===========================================================================*/ +/* Driver interrupt handlers. */ +/*===========================================================================*/ + +/*===========================================================================*/ +/* Driver exported functions. */ +/*===========================================================================*/ + /** * @brief Initializes the Time Measurement unit. * diff --git a/os/hal/templates/halconf.h b/os/hal/templates/halconf.h index 9a0d3c7d7..84648991f 100644 --- a/os/hal/templates/halconf.h +++ b/os/hal/templates/halconf.h @@ -36,8 +36,11 @@ /** * @name Drivers enable switches - * @{ */ +#if !defined(HAL_USE_TM) || defined(__DOXYGEN__) +#define HAL_USE_TM TRUE +#endif + /** * @brief Enables the PAL subsystem. */ @@ -197,22 +200,6 @@ #endif /** @} */ -/*===========================================================================*/ -/** - * @name EXT driver related setting - * @{ - */ -/*===========================================================================*/ -/** @} */ - -/*===========================================================================*/ -/** - * @name GPT driver related setting - * @{ - */ -/*===========================================================================*/ -/** @} */ - /*===========================================================================*/ /** * @name I2C driver related setting @@ -228,14 +215,6 @@ #endif /** @} */ -/*===========================================================================*/ -/** - * @name ICU driver related setting - * @{ - */ -/*===========================================================================*/ -/** @} */ - /*===========================================================================*/ /** * @name MAC driver related setting @@ -304,22 +283,6 @@ #endif /** @} */ -/*===========================================================================*/ -/** - * @name PAL driver related setting - * @{ - */ -/*===========================================================================*/ -/** @} */ - -/*===========================================================================*/ -/** - * @name PWM driver related setting - * @{ - */ -/*===========================================================================*/ -/** @} */ - /*===========================================================================*/ /** * @name SDC driver related setting @@ -426,14 +389,6 @@ #endif /** @} */ -/*===========================================================================*/ -/** - * @name UART driver related setting - * @{ - */ -/*===========================================================================*/ -/** @} */ - #endif /* _HALCONF_H_ */ /** @} */ diff --git a/os/hal/templates/meta/driver_lld.h b/os/hal/templates/meta/driver_lld.h index 5af5a4174..9212fcbfb 100644 --- a/os/hal/templates/meta/driver_lld.h +++ b/os/hal/templates/meta/driver_lld.h @@ -47,7 +47,6 @@ /* Driver data structures and types. */ /*===========================================================================*/ - /** * @brief Type of a structure representing an XXX driver. */ -- cgit v1.2.3