aboutsummaryrefslogtreecommitdiffstats
path: root/include
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
parent9c738e00fab50b4bf763fa5254e6542aff7fa78c (diff)
downloaduGFX-e1de308dfabc160f724df51ebebc59bde9717c08.tar.gz
uGFX-e1de308dfabc160f724df51ebebc59bde9717c08.tar.bz2
uGFX-e1de308dfabc160f724df51ebebc59bde9717c08.zip
ginput doxygen
Diffstat (limited to 'include')
-rw-r--r--include/ginput/dial.h61
-rw-r--r--include/ginput/keyboard.h20
-rw-r--r--include/ginput/mouse.h11
-rw-r--r--include/ginput/toggle.h29
4 files changed, 98 insertions, 23 deletions
diff --git a/include/ginput/dial.h b/include/ginput/dial.h
index 90db94ac..1021b298 100644
--- a/include/ginput/dial.h
+++ b/include/ginput/dial.h
@@ -50,15 +50,58 @@ typedef struct GEventDial_t {
extern "C" {
#endif
- /* Dial Functions */
- GSourceHandle ginputGetDial(uint16_t instance); // Instance = 0 to n-1
- void ginputResetDialRange(uint16_t instance); // Reset the maximum value back to the hardware default.
- uint16_t ginputGetDialRange(uint16_t instance); // Get the maximum value. The readings are scaled to be 0...max-1. 0 means over the full uint16_t range.
- void ginputSetDialRange(uint16_t instance, uint16_t max); // Set the maximum value.
- void ginputSetDialSensitivity(uint16_t instance, uint16_t diff); // Set the level change required before a dial event is generated.
- // - This is done after range scaling
- /* Get the current keyboard button status.
- * Returns FALSE on error (eg invalid instance)
+ /**
+ * @brief Create a dial input instance
+ *
+ * @param[in] instance The ID of the dial input instance (from 0 to 9999)
+ *
+ * @return The soure handle of the created dial instance
+ */
+ GSourceHandle ginputGetDial(uint16_t instance);
+
+ /**
+ * @brief Reset the value back to the hardware default
+ *
+ * @param[in] instance The ID of the dial input instance
+ */
+ void ginputResetDialRange(uint16_t instance);
+
+ /**
+ * @brief Get the maximum value
+ * @details The readings are scaled to be 0 ... max-1.
+ * 0 means over the full uint16_t range.
+ *
+ * @param[in] instance The ID of the dial input instance
+ *
+ * @return The maximum value
+ */
+ uint16_t ginputGetDialRange(uint16_t instance);
+
+ /**
+ * @brief Set the maximum value
+ * @note This shouldn't be set higher that the hardwares possible maximum value
+ *
+ * @param[in] instance The ID of the dial input instance
+ * @param[in] max The maximum value to be set
+ */
+ void ginputSetDialRange(uint16_t instance, uint16_t max);
+
+ /**
+ * @brief Set the level change required before a dial even is generated (threshold)
+ * @note This is done after range scaling
+ *
+ * @param[in] instance The ID of the dial input instance
+ * @param[in] diff The amount of level changes
+ */
+ void ginputSetDialSensitivity(uint16_t instance, uint16_t diff);
+
+ /**
+ * @brief Get the current dial status
+ *
+ * @param[in] instance The ID of the dial input instance
+ * @param[in] pdial The dial event struct
+ *
+ * @return Returns FALSE on an error (eg invalid instance)
*/
bool_t ginputGetDialStatus(uint16_t instance, GEventDial *pdial);
diff --git a/include/ginput/keyboard.h b/include/ginput/keyboard.h
index cbb11194..086d7f71 100644
--- a/include/ginput/keyboard.h
+++ b/include/ginput/keyboard.h
@@ -108,11 +108,22 @@ typedef struct GEventKeyboard_t {
extern "C" {
#endif
- /* Keyboard Functions */
- GSourceHandle ginputGetKeyboard(uint16_t instance); // Instance = 0 to n-1
+ /**
+ * @brief Create a keyboard input instance
+ *
+ * @param[in] instance The ID of the keyboard input instance (from 0 to 9999)
+ *
+ * @return The source handle of the created input instance
+ */
+ GSourceHandle ginputGetKeyboard(uint16_t instance);
- /* Get the current keyboard button status.
- * Returns FALSE on error (eg invalid instance)
+ /**
+ * @brief Get the current keyboard status
+ *
+ * @param[in] instance The ID of the keyboard input instance
+ * @param[in] pkeyboard The keyboard event struct
+ *
+ * @return Returns FALSE on an error (eg invalid instance)
*/
bool_t ginputGetKeyboardStatus(uint16_t instance, GEventKeyboard *pkeyboard);
@@ -124,3 +135,4 @@ extern "C" {
#endif /* _GINPUT_KEYBOARD_H */
/** @} */
+
diff --git a/include/ginput/mouse.h b/include/ginput/mouse.h
index db0a133a..09bfa050 100644
--- a/include/ginput/mouse.h
+++ b/include/ginput/mouse.h
@@ -89,7 +89,7 @@ extern "C" {
* @brief Creates an instance of a mouse and returns the Source handler
* @note hack: if the instance is 9999, no calibration will be performed!
*
- * @param[in] instance The instance ID, from 0 to 9999
+ * @param[in] instance The ID of the mouse input instance (from 0 to 9999)
*
* @return The source handle of the created instance
*/
@@ -100,7 +100,7 @@ extern "C" {
* @note Unlinke a listener event, this status cannot record meta events such as
* "CLICK".
*
- * @param[in] instance The instance
+ * @param[in] instance The ID of the mouse input instance
* @param[in] pmouse The mouse event
*
* @return FALSE on an error (eg. invalid instance)
@@ -110,7 +110,7 @@ extern "C" {
/**
* @brief Performs a calibration
*
- * @param[in] instance The instance to be calibrated
+ * @param[in] instance The ID of the mouse input instance
*
* @return FALSE if the driver dosen't support a calibration of if the handle is invalid
*/
@@ -134,7 +134,7 @@ extern "C" {
* data is has already obtained.
* The 'requireFree' parameter indicates if the fetch buffer must be free()'d to deallocate the buffer provided by the Fetch routine.
*
- * @param[in] instance The instance
+ * @param[in] instance The ID of the mouse input instance
* @param[in] fnsave The routine to save the data
* @param[in] fnload The routine to restore the data
* @param[in] requireFree ToDo
@@ -145,7 +145,7 @@ extern "C" {
* @brief Test if a particular mouse/touch instance requires routines to save it's alibration data
* @note Not implemented yet
*
- * @param[in] instance The instance
+ * @param[in] instance The ID of the mouse input instance
*
* @return TRUE if needed
*/
@@ -159,3 +159,4 @@ extern "C" {
#endif /* _GINPUT_MOUSE_H */
/** @} */
+
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 */
/** @} */
+