aboutsummaryrefslogtreecommitdiffstats
path: root/os/hal/include/gpt.h
diff options
context:
space:
mode:
authorgdisirio <gdisirio@35acf78f-673a-0410-8e92-d51de3d6d3f4>2014-03-08 10:19:32 +0000
committergdisirio <gdisirio@35acf78f-673a-0410-8e92-d51de3d6d3f4>2014-03-08 10:19:32 +0000
commit6bc9f636b5488434375da0296a3d90285dc1cec4 (patch)
treeb48404ced7251d3ec32dd816e7d4f96df8357d57 /os/hal/include/gpt.h
parentf40d33139e0bd179b766d1576dfd7b494734ff67 (diff)
downloadChibiOS-6bc9f636b5488434375da0296a3d90285dc1cec4.tar.gz
ChibiOS-6bc9f636b5488434375da0296a3d90285dc1cec4.tar.bz2
ChibiOS-6bc9f636b5488434375da0296a3d90285dc1cec4.zip
More enhancements to the GPT driver.
git-svn-id: svn://svn.code.sf.net/p/chibios/svn/branches/kernel_3_dev@6759 35acf78f-673a-0410-8e92-d51de3d6d3f4
Diffstat (limited to 'os/hal/include/gpt.h')
-rw-r--r--os/hal/include/gpt.h32
1 files changed, 27 insertions, 5 deletions
diff --git a/os/hal/include/gpt.h b/os/hal/include/gpt.h
index 3b474cb14..a900243ba 100644
--- a/os/hal/include/gpt.h
+++ b/os/hal/include/gpt.h
@@ -79,9 +79,7 @@ typedef void (*gptcallback_t)(GPTDriver *gptp);
/**
* @brief Changes the interval of GPT peripheral.
* @details This function changes the interval of a running GPT unit.
- * @pre The GPT unit must have been activated using @p gptStart().
- * @pre The GPT unit must have been running in continuous mode using
- * @p gptStartContinuous().
+ * @pre The GPT unit must be running in continuous mode.
* @post The GPT unit interval is changed to the new value.
*
* @param[in] gptp pointer to a @p GPTDriver object
@@ -89,10 +87,34 @@ typedef void (*gptcallback_t)(GPTDriver *gptp);
*
* @iclass
*/
-#define gptChangeIntervalI(gptp, interval) { \
- gpt_lld_change_interval(gptp, interval); \
+#define gptChangeIntervalI(gptp, interval) { \
+ gpt_lld_change_interval(gptp, interval); \
}
+/**
+ * @brief Returns the interval of GPT peripheral.
+ * @pre The GPT unit must be running in continuous mode.
+ *
+ * @param[in] gptp pointer to a @p GPTDriver object
+ * @return The current interval.
+ *
+ * @xclass
+ */
+#define gptGetIntervalX(gptp) gpt_lld_get_interval(gptp)
+
+/**
+ * @brief Returns the counter value of GPT peripheral.
+ * @pre The GPT unit must be running in continuous mode.
+ * @note The nature of the counter is not defined, it may count upward
+ * or downward, it could be continuously running or not.
+ *
+ * @param[in] gptp pointer to a @p GPTDriver object
+ * @return The current counter value.
+ *
+ * @xclass
+ */
+#define gptGetCounterX(gptp) gpt_lld_get_counter(gptp)
+
/*===========================================================================*/
/* External declarations. */
/*===========================================================================*/