OSDN Git Service

Lower MAX_EVENTS constant to save a little bit of RAM
authorPatrick Porlan <patrick.porlan@intel.com>
Wed, 11 Feb 2015 09:46:13 +0000 (10:46 +0100)
committerGerrit Code Review <gerrit2@irsgerrit001.ir.intel.com>
Wed, 11 Feb 2015 10:27:54 +0000 (10:27 +0000)
As of today none of the supported sensor types requires more
than two events ; let's adjust this constant down, as it can
easily be bumped up whenever we add support for more complex
sensor types.

Change-Id: I4916717aed5cd8cc0db6ef58bc703c6251965b27
Signed-off-by: Patrick Porlan <patrick.porlan@intel.com>
common.h

index 98aa4c9..c35b88b 100644 (file)
--- a/common.h
+++ b/common.h
@@ -8,7 +8,7 @@
 #define MAX_DEVICES    9       /* Check iio devices 0 to MAX_DEVICES-1 */
 #define MAX_SENSORS    12      /* We can handle as many sensors */
 #define MAX_CHANNELS   4       /* We can handle as many channels per sensor */
-#define MAX_EVENTS     8       /* We can handle as many events per channel */
+#define MAX_EVENTS     2       /* We can handle as many events per channel */
 #define MAX_TRIGGERS   8       /* Check for triggers 0 to MAX_TRIGGERS-1 */
 
 #define DEV_FILE_PATH          "/dev/iio:device%d"