drivers: set LIS2DH default trigger mode to "EDGE_BOTH"

Previous value just activated the ability to trigger for both edges,
without (de)-activating the gpio. This caused an assrtion error in GPIO.h.

Fixes #71227

Signed-off-by: Juliane Schulze <juliane.schulze@deveritec.com>
This commit is contained in:
Juliane Schulze 2024-04-08 15:46:21 +02:00 committed by Carles Cufí
commit 72b20315ea
3 changed files with 4 additions and 4 deletions

View file

@ -19,7 +19,7 @@ LOG_MODULE_DECLARE(lis2dh, CONFIG_SENSOR_LOG_LEVEL);
#include "lis2dh.h" #include "lis2dh.h"
static const gpio_flags_t gpio_int_cfg[5] = { static const gpio_flags_t gpio_int_cfg[5] = {
GPIO_INT_EDGE, GPIO_INT_EDGE_BOTH,
GPIO_INT_EDGE_RISING, GPIO_INT_EDGE_RISING,
GPIO_INT_EDGE_FALLING, GPIO_INT_EDGE_FALLING,
GPIO_INT_LEVEL_HIGH, GPIO_INT_LEVEL_HIGH,

View file

@ -34,7 +34,7 @@ properties:
The default of 0 is the most common situation to avoid multiple interrupts The default of 0 is the most common situation to avoid multiple interrupts
to be triggered by same event. to be triggered by same event.
- 0 # LIS2DH_DT_GPIO_INT_EDGE - 0 # LIS2DH_DT_GPIO_INT_EDGE_BOTH
- 1 # LIS2DH_DT_GPIO_INT_EDGE_RISING - 1 # LIS2DH_DT_GPIO_INT_EDGE_RISING
- 2 # LIS2DH_DT_GPIO_INT_EDGE_FALLING - 2 # LIS2DH_DT_GPIO_INT_EDGE_FALLING
- 3 # LIS2DH_DT_GPIO_INT_LEVEL_HIGH - 3 # LIS2DH_DT_GPIO_INT_LEVEL_HIGH
@ -51,7 +51,7 @@ properties:
The default of 0 is the most common situation to avoid multiple interrupts The default of 0 is the most common situation to avoid multiple interrupts
to be triggered by same event. to be triggered by same event.
- 0 # LIS2DH_DT_GPIO_INT_EDGE - 0 # LIS2DH_DT_GPIO_INT_EDGE_BOTH
- 1 # LIS2DH_DT_GPIO_INT_EDGE_RISING - 1 # LIS2DH_DT_GPIO_INT_EDGE_RISING
- 2 # LIS2DH_DT_GPIO_INT_EDGE_FALLING - 2 # LIS2DH_DT_GPIO_INT_EDGE_FALLING
- 3 # LIS2DH_DT_GPIO_INT_LEVEL_HIGH - 3 # LIS2DH_DT_GPIO_INT_LEVEL_HIGH

View file

@ -7,7 +7,7 @@
#define ZEPHYR_INCLUDE_DT_BINDINGS_ST_LIS2DH_H_ #define ZEPHYR_INCLUDE_DT_BINDINGS_ST_LIS2DH_H_
/* GPIO interrupt configuration */ /* GPIO interrupt configuration */
#define LIS2DH_DT_GPIO_INT_EDGE 0 #define LIS2DH_DT_GPIO_INT_EDGE_BOTH 0
#define LIS2DH_DT_GPIO_INT_EDGE_RISING 1 #define LIS2DH_DT_GPIO_INT_EDGE_RISING 1
#define LIS2DH_DT_GPIO_INT_EDGE_FALLING 2 #define LIS2DH_DT_GPIO_INT_EDGE_FALLING 2
#define LIS2DH_DT_GPIO_INT_LEVEL_HIGH 3 #define LIS2DH_DT_GPIO_INT_LEVEL_HIGH 3