summaryrefslogtreecommitdiff
path: root/nuttx/include/nuttx
diff options
context:
space:
mode:
authorGregory Nutt <gnutt@nuttx.org>2014-12-16 10:18:44 -0600
committerGregory Nutt <gnutt@nuttx.org>2014-12-16 10:18:44 -0600
commitf7f9a4bca38c97ff20b0ef046dc99a7d5b02efde (patch)
tree315a7157704ba9aa5896a9d3fd93774b4b131049 /nuttx/include/nuttx
parent167be0814ad7007651709d59d393512b6e12d54a (diff)
downloadnuttx-f7f9a4bca38c97ff20b0ef046dc99a7d5b02efde.tar.gz
nuttx-f7f9a4bca38c97ff20b0ef046dc99a7d5b02efde.tar.bz2
nuttx-f7f9a4bca38c97ff20b0ef046dc99a7d5b02efde.zip
Minor clean-up associated with the ADX345 driver
Diffstat (limited to 'nuttx/include/nuttx')
-rw-r--r--nuttx/include/nuttx/sensors/adxl345.h73
1 files changed, 17 insertions, 56 deletions
diff --git a/nuttx/include/nuttx/sensors/adxl345.h b/nuttx/include/nuttx/sensors/adxl345.h
index a12a2ed1d..fc2f76d5c 100644
--- a/nuttx/include/nuttx/sensors/adxl345.h
+++ b/nuttx/include/nuttx/sensors/adxl345.h
@@ -53,7 +53,11 @@
* Pre-Processor Definitions
********************************************************************************************/
/* Configuration ****************************************************************************/
-/* Settings that effect the driver: CONFIG_DISABLE_POLL
+/* Prerequisites:
+ *
+ * CONFIG_SCHED_WORKQUEUE - Work queue support is required
+ *
+ * Settings that effect the driver: CONFIG_DISABLE_POLL
*
* CONFIG_SENSORS_ADXL345
* Enables support for the ADXL345 driver
@@ -61,35 +65,22 @@
* Enables support for the SPI interface (not currenly supported)
* CONFIG_ADXL345_I2C
* Enables support for the I2C interface
- * CONFIG_ADXL345_MULTIPLE
- * Can be defined to support multiple ADXL345 devices on board.
- * CONFIG_ADXL345_NPOLLWAITERS
- * Maximum number of threads that can be waiting on poll() (ignored if
- * CONFIG_DISABLE_POLL is set).
- * CONFIG_ADXL345_TSC_DISABLE
- * Disable driver touchscreen functionality.
- * CONFIG_ADXL345_ADC_DISABLE
- * Disable driver ADC functionality.
- * CONFIG_ADXL345_GPIO_DISABLE
- * Disable driver GPIO functionality.
- * CONFIG_ADXL345_GPIOINT_DISABLE
- * Disable driver GPIO interrupt functionlality (ignored if GPIO functionality is
- * disabled).
- * CONFIG_ADXL345_SWAPXY
- * Reverse the meaning of X and Y to handle different LCD orientations.
- * CONFIG_ADXL345_TEMP_DISABLE
- * Disable driver temperature sensor functionality.
+ * CONFIG_ADXL345_ACTIVELOW
+ * The ADXL345 interrupt will be inverted. Instead starting low and
+ * going high, it will start high and will go low when an interrupt
+ * is fired. Default: Active high/rising edge.
* CONFIG_ADXL345_REGDEBUG
* Enable very low register-level debug output. Requires CONFIG_DEBUG.
- * CONFIG_ADXL345_THRESHX and CONFIG_ADXL345_THRESHY
- * ADXL345 touchscreen data comes in a a very high rate. New touch positions
- * will only be reported when the X or Y data changes by these thresholds.
- * This trades reduces data rate for some loss in dragging accuracy. The
- * ADXL345 is configure for 12-bit values so the raw ranges are 0-4095. So
- * for example, if your display is 320x240, then THRESHX=13 and THRESHY=17
- * would correspond to one pixel. Default: 12
*/
+#ifdef CONFIG_DISABLE_SIGNALS
+# error "Signals are required. CONFIG_DISABLE_SIGNALS must not be selected."
+#endif
+
+#ifndef CONFIG_SCHED_WORKQUEUE
+# error "Work queue support required. CONFIG_SCHED_WORKQUEUE must be selected."
+#endif
+
/* The ADXL345 interfaces with the target CPU via a I2C or SPI interface. The pin IN_1
* allows the selection of interface protocol at reset state.
*/
@@ -102,12 +93,6 @@
# error "Only one of CONFIG_ADXL345_SPI or CONFIG_ADXL345_I2C can be defined"
#endif
-/* Maximum number of threads than can be waiting for POLL events */
-
-#ifndef CONFIG_ADXL345_NPOLLWAITERS
-# define CONFIG_ADXL345_NPOLLWAITERS 2
-#endif
-
/* Check for some required settings. This can save the user a lot of time
* in getting the right configuration.
*/
@@ -121,30 +106,6 @@
# endif
#endif
-#ifdef CONFIG_DISABLE_SIGNALS
-# error "Signals are required. CONFIG_DISABLE_SIGNALS must not be selected."
-#endif
-
-#ifndef CONFIG_SCHED_WORKQUEUE
-# error "Work queue support required. CONFIG_SCHED_WORKQUEUE must be selected."
-#endif
-
-/* Thresholds */
-
-#ifndef CONFIG_ADXL345_THRESHX
-# define CONFIG_ADXL345_THRESHX 12
-#endif
-
-#ifndef CONFIG_ADXL345_THRESHY
-# define CONFIG_ADXL345_THRESHY 12
-#endif
-
-/* Debug output */
-
-#ifndef CONFIG_DEBUG
-# undef CONFIG_ADXL345_REGDEBUG
-#endif
-
/* I2C **************************************************************************************/
/* ADXL345 Address: The ADXL345 may have 7-bit address 0x41 or 0x44, depending upon the
* state of the ADDR0 pin.