diff options
-rw-r--r-- | docs/src/gtimer.dox | 36 | ||||
-rw-r--r-- | include/gtimer.h | 6 |
2 files changed, 40 insertions, 2 deletions
diff --git a/docs/src/gtimer.dox b/docs/src/gtimer.dox new file mode 100644 index 00000000..65dca871 --- /dev/null +++ b/docs/src/gtimer.dox @@ -0,0 +1,36 @@ +/*
+ ChibiOS/GFX - Copyright (C) 2012
+ Joel Bodenmann aka Tectu <joel@unormal.org>
+
+ 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 <http://www.gnu.org/licenses/>.
+*/
+
+/**
+ * @addtogroup GTIMER
+ * @details The GTIMER module provides high level, simple and hardware
+ * independend timers. The timers are meant to be used in different
+ * ChibiOS/GFX modules and are not very accurate.
+ *
+ * @details The reason why ChibiOS/GFX has it's own timer abstraction is because
+ * virtual timers provided by ChibiOS/RT are interrupt context only.
+ * While great for what they are designed for, they make coding of the input
+ * drivers much more complex.
+ * For non-performance critical drivers like these input drivers, it would also
+ * hog an in-ordinate amount of critical (interrupt locked) system time.
+ * This contrary to the goals of a real-time operating system. So a user-land
+ * (thread based) timer mechanism is also required.
+ */
+
diff --git a/include/gtimer.h b/include/gtimer.h index 2946e0ea..55bb209b 100644 --- a/include/gtimer.h +++ b/include/gtimer.h @@ -69,7 +69,9 @@ // A callback function (executed in a thread context)
typedef void (*GTimerFunction)(void *param);
-// A GTimer structure.
+/**
+ * @brief A GTimer structure
+ */
typedef struct GTimer_t {
GTimerFunction fn;
void *param;
@@ -78,7 +80,7 @@ typedef struct GTimer_t { uint16_t flags;
struct GTimer_t *next;
struct GTimer_t *prev;
- } GTimer;
+} GTimer;
/*===========================================================================*/
/* External declarations. */
|