diff options
author | Gwendal Grignou <gwendal@chromium.org> | 2015-08-25 22:58:41 -0700 |
---|---|---|
committer | chrome-bot <chrome-bot@chromium.org> | 2015-08-29 01:34:15 -0700 |
commit | 32867104da45ae38e37163ba6d04f847bc15e6bc (patch) | |
tree | e33a7142343d43eeeabaed6a097304459cde4a83 /include | |
parent | 4e7e1bb796190e658ea2de8d4e391efa59b0d643 (diff) | |
download | chrome-ec-32867104da45ae38e37163ba6d04f847bc15e6bc.tar.gz |
samus: Use new config, fix gesture
Use new config table.
Move ODR setting in motion sense, fix variable names.
BRANCH=samus
BUG=chromium:513458
TEST=Test accelerator and double tap on Samus
Change-Id: I341add11a18de8e4cc97c57da29f9114bd2014cf
Signed-off-by: Gwendal Grignou <gwendal@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/295638
Reviewed-by: Alec Berg <alecaberg@chromium.org>
Diffstat (limited to 'include')
-rw-r--r-- | include/gesture.h | 7 | ||||
-rw-r--r-- | include/motion_sense.h | 9 |
2 files changed, 7 insertions, 9 deletions
diff --git a/include/gesture.h b/include/gesture.h index 901f881b50..d98dc8cdf8 100644 --- a/include/gesture.h +++ b/include/gesture.h @@ -16,4 +16,11 @@ void gesture_calc(void); /* gesture hooks are triggered after the motion sense hooks. */ #define GESTURE_HOOK_PRIO (MOTION_SENSE_HOOK_PRIO + 10) +/* Output datarate for tap sensor (in milli-Hz) */ +/* + * Note: lsm6ds0 accel needs twice the expected data rate in order to guarantee + * that we have a new data sample every reading. + */ +#define TAP_ODR (2 * (1000000 / CONFIG_GESTURE_SAMPLING_INTERVAL_MS)) + #endif /* __CROS_EC_GESTURE_H */ diff --git a/include/motion_sense.h b/include/motion_sense.h index 6541893d67..d01c2b907e 100644 --- a/include/motion_sense.h +++ b/include/motion_sense.h @@ -42,15 +42,6 @@ enum sensor_config { /* Next 8 events for sensor interrupt lines */ #define TASK_EVENT_MOTION_INTERRUPT_MASK (0xff << 2) -/* Define sensor sampling interval in suspend. */ -#ifdef CONFIG_GESTURE_DETECTION -#define SUSPEND_SAMPLING_INTERVAL (CONFIG_GESTURE_SAMPLING_INTERVAL_MS * MSEC) -#elif defined(CONFIG_ACCEL_FIFO) -#define SUSPEND_SAMPLING_INTERVAL (1000 * MSEC) -#else -#define SUSPEND_SAMPLING_INTERVAL (100 * MSEC) -#endif - /* Minimum time in between running motion sense task loop. */ #define MIN_MOTION_SENSE_WAIT_TIME (3 * MSEC) #define MAX_MOTION_SENSE_WAIT_TIME (60000 * MSEC) |