From b86c313aa2f86836fd8801e1937b1410679d5cb1 Mon Sep 17 00:00:00 2001 From: Joel Bodenmann Date: Tue, 6 Nov 2012 23:55:45 +0100 Subject: [PATCH] doxygen tweaks - not complete yet --- drivers/touchpad/ADS7843/touchpad_lld.c | 27 +++++++++++-------- .../touchpad/ADS7843/touchpad_lld_config.h | 3 ++- drivers/touchpad/XPT2046/touchpad_lld.c | 24 ++++++++++------- .../touchpad/XPT2046/touchpad_lld_config.h | 3 ++- src/drivers.c | 25 +++++++++++++++++ templates/touchpadXXX/touchpad_lld.c | 3 ++- 6 files changed, 62 insertions(+), 23 deletions(-) create mode 100644 src/drivers.c diff --git a/drivers/touchpad/ADS7843/touchpad_lld.c b/drivers/touchpad/ADS7843/touchpad_lld.c index 74b06095..ac375e60 100644 --- a/drivers/touchpad/ADS7843/touchpad_lld.c +++ b/drivers/touchpad/ADS7843/touchpad_lld.c @@ -19,10 +19,11 @@ */ /** - * @file drivers/touchpad/XPT2046/touchpad_lld.c + * @file drivers/touchpad/ADS7843/touchpad_lld.c * @brief Touchpad Driver subsystem low level driver source. * - * @addtogroup TOUCHPAD + * @defgroup ADS7843 + * @ingroup DRIVERS * @{ */ @@ -85,7 +86,6 @@ void tp_lld_init(const TOUCHPADDriver *tp) { * @param[in] cmd The command bits to send to the touchpad * * @return The read value 12-bit right-justified - * * @note This function only reads data, it is assumed that the pins are * configured properly and the bus has been acquired beforehand * @@ -107,7 +107,6 @@ uint16_t tp_lld_read_value(uint8_t cmd) { /** * @brief 7-point median filtering code for touchpad samples - * * @note This is an internally used routine only. * * @notapi @@ -129,10 +128,11 @@ static void tp_lld_filter(void) { } /** - * @brief Reads out the X direction. - * + * @brief Reads out the X value. * @note The samples are median filtered for greater noise reduction * + * @return The uncalibrated but filtered X value + * * @notapi */ uint16_t tp_lld_read_x(void) { @@ -170,8 +170,11 @@ uint16_t tp_lld_read_x(void) { return sampleBuf[3]; } -/* - * @brief Reads out the Y direction. +/** + * @brief Reads out the Y value. + * @note The samples are median filtered for greater noise reduction + * + * @return The uncalibrated but filtered Y value * * @notapi */ @@ -212,8 +215,8 @@ uint16_t tp_lld_read_y(void) { /* ---- Optional Routines ---- */ #if TOUCHPAD_HAS_IRQ || defined(__DOXYGEN__) - /* - * @brief for checking if touchpad is pressed or not. + /** + * @brief For checking if touchpad is pressed or not. * * @return 1 if pressed / 0 if not pressed * @@ -225,9 +228,11 @@ uint16_t tp_lld_read_y(void) { #endif #if TOUCHPAD_HAS_PRESSURE || defined(__DOXYGEN__) - /* + /** * @brief Reads out the Z direction / pressure. * + * @return The amount of preasure + * * @notapi */ uint16_t tp_lld_read_z(void) { diff --git a/drivers/touchpad/ADS7843/touchpad_lld_config.h b/drivers/touchpad/ADS7843/touchpad_lld_config.h index 13b48922..dd2c9dda 100644 --- a/drivers/touchpad/ADS7843/touchpad_lld_config.h +++ b/drivers/touchpad/ADS7843/touchpad_lld_config.h @@ -22,7 +22,8 @@ * @file drivers/touchpad/ADS7843/touchpad_lld_config.h * @brief Touchpad Driver subsystem low level driver. * - * @addtogroup TOUCHPAD + * @defgroup ADS7843 + * @ingroup DRIVERS * @{ */ diff --git a/drivers/touchpad/XPT2046/touchpad_lld.c b/drivers/touchpad/XPT2046/touchpad_lld.c index 50ff6acc..42f3e8d2 100644 --- a/drivers/touchpad/XPT2046/touchpad_lld.c +++ b/drivers/touchpad/XPT2046/touchpad_lld.c @@ -22,7 +22,8 @@ * @file drivers/touchpad/XPT2046/touchpad_lld.c * @brief Touchpad Driver subsystem low level driver source. * - * @addtogroup TOUCHPAD + * @defgroup XPT2046 + * @ingroup DRIVERS * @{ */ @@ -107,8 +108,7 @@ uint16_t tp_lld_read_value(uint8_t cmd) { /** * @brief 7-point median filtering code for touchpad samples - * - * @note This is an internally used routine only. + * @note This is an internally used routine only * * @notapi */ @@ -129,10 +129,11 @@ static void tp_lld_filter(void) { } /** - * @brief Reads out the X direction. - * + * @brief Reads out the X value. * @note The samples are median filtered for greater noise reduction * + * @return The uncalibrated but filtered X value + * * @notapi */ uint16_t tp_lld_read_x(void) { @@ -170,8 +171,11 @@ uint16_t tp_lld_read_x(void) { return sampleBuf[3]; } -/* - * @brief Reads out the Y direction. +/** + * @brief Reads out the Y value. + * @note The samples are median filtered for greated noise reduction + * + * @return The uncalibrated but filtered Y value * * @notapi */ @@ -212,7 +216,7 @@ uint16_t tp_lld_read_y(void) { /* ---- Optional Routines ---- */ #if TOUCHPAD_HAS_IRQ || defined(__DOXYGEN__) - /* + /** * @brief for checking if touchpad is pressed or not. * * @return 1 if pressed / 0 if not pressed @@ -225,9 +229,11 @@ uint16_t tp_lld_read_y(void) { #endif #if TOUCHPAD_HAS_PRESSURE || defined(__DOXYGEN__) - /* + /** * @brief Reads out the Z direction / pressure. * + * @return The mount of preasure + * * @notapi */ uint16_t tp_lld_read_z(void) { diff --git a/drivers/touchpad/XPT2046/touchpad_lld_config.h b/drivers/touchpad/XPT2046/touchpad_lld_config.h index f1cd9ff5..d0d1fb61 100644 --- a/drivers/touchpad/XPT2046/touchpad_lld_config.h +++ b/drivers/touchpad/XPT2046/touchpad_lld_config.h @@ -22,7 +22,8 @@ * @file drivers/touchpad/XPT2046/touchpad_lld_config.h * @brief Touchppad Driver subsystem low level driver. * - * @addtogroup TOUCHPAD + * @defgroup XPT2046 + * @ingroup DRIVERS * @{ */ diff --git a/src/drivers.c b/src/drivers.c new file mode 100644 index 00000000..12e1ded8 --- /dev/null +++ b/src/drivers.c @@ -0,0 +1,25 @@ +/* + ChibiOS/GFX - Copyright (C) 2012 + Joel Bodenmann aka Tectu + + This file is part of ChibiOS/GFX. + + ChibiOS/GFX is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 3 of the License, or + (at your option) any later version. + + ChibiOS/GFX is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program. If not, see . +*/ + +/** + * @addtogroup DRIVERS + * @{ + */ + diff --git a/templates/touchpadXXX/touchpad_lld.c b/templates/touchpadXXX/touchpad_lld.c index 8a832d8c..2767e0fc 100644 --- a/templates/touchpadXXX/touchpad_lld.c +++ b/templates/touchpadXXX/touchpad_lld.c @@ -22,7 +22,8 @@ * @file templates/touchpadXXX/touchpad_lld.c * @brief Touchpad Driver subsystem low level driver source. * - * @addtogroup TOUCHPAD + * @defgroup touchpadXXX + * @ingroup DRIVERS * @{ */