summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--nuttx/drivers/input/Kconfig5
-rw-r--r--nuttx/drivers/input/ajoystick.c11
-rw-r--r--nuttx/drivers/input/djoystick.c11
-rw-r--r--nuttx/include/nuttx/input/ajoystick.h9
4 files changed, 31 insertions, 5 deletions
diff --git a/nuttx/drivers/input/Kconfig b/nuttx/drivers/input/Kconfig
index 12717e2f6..2a58768f4 100644
--- a/nuttx/drivers/input/Kconfig
+++ b/nuttx/drivers/input/Kconfig
@@ -347,8 +347,9 @@ config AJOYSTICK
---help---
Enable standard analog joystick upper half driver. An analog
joystick refers to a joystick that provides position data as an
- integer value that might have been obtained through DACs.
- Discrete button inputs are also supported.
+ integer value that might have been obtained through Analog-
+ to-Digital Conversion (ADC). The analog positional data may also
+ be accompanied by discrete button data.
if AJOYSTICK
diff --git a/nuttx/drivers/input/ajoystick.c b/nuttx/drivers/input/ajoystick.c
index 4ab7e6dd6..1054b8ca3 100644
--- a/nuttx/drivers/input/ajoystick.c
+++ b/nuttx/drivers/input/ajoystick.c
@@ -33,6 +33,17 @@
*
****************************************************************************/
+/* This file provides a driver for a standard analog joystick device. An
+ * analog joystick refers to a joystick that provides X/Y positional data as
+ * integer values such as might be provides by Analog-to-Digital Conversion
+ * (ADC). The analog positional data may also be accompanied by discrete
+ * button data.
+ *
+ * The analog joystick driver exports a standard character driver
+ * interface. By convention, the analog joystick is registered as an input
+ * device at /dev/ajoyN where N uniquely identifies the driver instance.
+ */
+
/****************************************************************************
* Included Files
****************************************************************************/
diff --git a/nuttx/drivers/input/djoystick.c b/nuttx/drivers/input/djoystick.c
index 80e704851..0e746634f 100644
--- a/nuttx/drivers/input/djoystick.c
+++ b/nuttx/drivers/input/djoystick.c
@@ -33,6 +33,17 @@
*
****************************************************************************/
+/* This file provides a driver for a standard discrete joystick device. A
+ * discrete joystick refers to a joystick that could be implemented entirely
+ * with GPIO input pins. So up, down, left, and right are all discrete
+ * values like buttons (as opposed to integer values like you might obtain
+ * from an analog joystick).
+ *
+ * The discrete joystick driver exports a standard character driver
+ * interface. By convention, the discrete joystick is registered as an input
+ * device at /dev/djoyN where N uniquely identifies the driver instance.
+ */
+
/****************************************************************************
* Included Files
****************************************************************************/
diff --git a/nuttx/include/nuttx/input/ajoystick.h b/nuttx/include/nuttx/input/ajoystick.h
index 3537f15f1..12f8ae406 100644
--- a/nuttx/include/nuttx/input/ajoystick.h
+++ b/nuttx/include/nuttx/input/ajoystick.h
@@ -35,8 +35,9 @@
/* This header file provides definition for a standard analog joystick
* interface. An analog joystick refers to a joystick that provides X/Y
- * positional data as integer values such as might be provides by DACs.
- * The analog positional data may be accompanied by discrete button data.
+ * positional data as integer values such as might be provides by Analog-
+ * to-Digital Conversion (ADC). The analog positional data may also be
+ * accompanied by discrete button data.
*
* The analog joystick driver exports a standard character driver
* interface. By convention, the analog joystick is registered as an input
@@ -109,7 +110,9 @@
*
* 1) The read() method will always return a single value of size
* struct ajoy_sample_s represent the current joystick positional and the
- * state of all joystick buttons. read() never blocks.
+ * state of all joystick buttons. read() never blocks. X an Y position
+ * data is raw converted data. Zeroing and scaling must be performed by
+ * the application.
* 2) The poll() method can be used to notify a client if there is a change
* in any of the joystick button inputs. This feature, of course,
* depends upon interrupt GPIO support from the platform. NOTE: that