aboutsummaryrefslogtreecommitdiffstats
path: root/include/ginput/toggle.h
diff options
context:
space:
mode:
authorJoel Bodenmann <joel@unormal.org>2012-12-18 20:06:10 +0100
committerJoel Bodenmann <joel@unormal.org>2012-12-18 20:06:10 +0100
commite1de308dfabc160f724df51ebebc59bde9717c08 (patch)
tree79ed9c2eff59f1d6e5fb28f07effc980b325c13a /include/ginput/toggle.h
parent9c738e00fab50b4bf763fa5254e6542aff7fa78c (diff)
downloaduGFX-e1de308dfabc160f724df51ebebc59bde9717c08.tar.gz
uGFX-e1de308dfabc160f724df51ebebc59bde9717c08.tar.bz2
uGFX-e1de308dfabc160f724df51ebebc59bde9717c08.zip
ginput doxygen
Diffstat (limited to 'include/ginput/toggle.h')
-rw-r--r--include/ginput/toggle.h29
1 files changed, 24 insertions, 5 deletions
diff --git a/include/ginput/toggle.h b/include/ginput/toggle.h
index f0bbf203..eaf5bafe 100644
--- a/include/ginput/toggle.h
+++ b/include/ginput/toggle.h
@@ -65,12 +65,30 @@ typedef struct GEventToggle_t {
extern "C" {
#endif
- /* Hardware Toggle/Switch/Button Functions */
- GSourceHandle ginputGetToggle(uint16_t instance); // Instance = 0 to n-1
- void ginputInvertToggle(uint16_t instance, bool_t invert); // If invert is true, invert the on/off sense for the toggle
+ /**
+ * @brief Create a toggle input instance
+ *
+ * @param[in] instance The ID of the toggle input instance (from 0 to 9999)
+ *
+ * @return The source handle of the created instance
+ */
+ GSourceHandle ginputGetToggle(uint16_t instance);
- /* Get the current toggle status.
- * Returns FALSE on error (eg invalid instance)
+ /**
+ * @brief Can be used to invert the sense of a toggle
+ *
+ * @param[in] instance The ID of the toggle input instance
+ * @param[in] invert If TRUE, will be inverted
+ */
+ void ginputInvertToggle(uint16_t instance, bool_t invert);
+
+ /**
+ * @brief Get the current toggle status
+ *
+ * @param[in] instance The ID of the toggle input instance
+ * @param[in] ptoggle The toggle event struct
+ *
+ * @return Returns FALSE on an error (eg invalid instance)
*/
bool_t ginputGetToggleStatus(uint16_t instance, GEventToggle *ptoggle);
@@ -82,3 +100,4 @@ extern "C" {
#endif /* _GINPUT_TOGGLE_H */
/** @} */
+