diff options
author | Tristan Honscheid <honscheid@google.com> | 2021-10-18 16:22:17 -0600 |
---|---|---|
committer | Commit Bot <commit-bot@chromium.org> | 2021-10-19 21:26:29 +0000 |
commit | fb7facda70d06efb0b9337ba8a8ed0834019a12a (patch) | |
tree | bf613809b09b9b6c21b415dcd0e16139ee2801b5 /driver | |
parent | 81e812f8a091217a7fedcf5cf88f33b462889af1 (diff) | |
download | chrome-ec-fb7facda70d06efb0b9337ba8a8ed0834019a12a.tar.gz |
zephyr: Test BMI260 interrupt handler
Quick test of the interrupt handler in accelgyro_bmi260.c that verifies
the event flags get set properly.
Also moved the definition of CONFIG_ACCELGYRO_BMI260_INT_EVENT in to the
corresponding header file so we can access that value in the test.
BRANCH=None
BUG=b:184856157
TEST=zmake configure --test zephyr/test/drivers
Signed-off-by: Tristan Honscheid <honscheid@google.com>
Change-Id: Ibf88aee12f661a7883d1fffb6b3a6d53b79289db
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3229647
Reviewed-by: Jack Rosenthal <jrosenth@chromium.org>
Diffstat (limited to 'driver')
-rw-r--r-- | driver/accelgyro_bmi260.c | 20 |
1 files changed, 0 insertions, 20 deletions
diff --git a/driver/accelgyro_bmi260.c b/driver/accelgyro_bmi260.c index fe0bf0e0cc..70672b3517 100644 --- a/driver/accelgyro_bmi260.c +++ b/driver/accelgyro_bmi260.c @@ -37,26 +37,6 @@ #define CPRINTF(format, args...) cprintf(CC_ACCEL, format, ## args) #define CPRINTS(format, args...) cprints(CC_ACCEL, format, ## args) -#if defined(CONFIG_ZEPHYR) && defined(CONFIG_ACCEL_INTERRUPTS) -/* - * Get the mostion sensor ID of the BMI260 sensor that - * generates the interrupt. - * The interrupt is converted to the event and transferred to motion - * sense task that actually handles the interrupt. - * - * Here, we use alias to get the motion sensor ID - * - * e.g) base_accel is the label of a child node in /motionsense-sensors - * aliases { - * bmi260-int = &base_accel; - * }; - */ -#if DT_NODE_EXISTS(DT_ALIAS(bmi260_int)) -#define CONFIG_ACCELGYRO_BMI260_INT_EVENT \ - TASK_EVENT_MOTION_SENSOR_INTERRUPT(SENSOR_ID(DT_ALIAS(bmi260_int))) -#endif -#endif - STATIC_IF(CONFIG_ACCEL_FIFO) volatile uint32_t last_interrupt_timestamp; /* |