drivers/sensor: lis2dw12: add threshold interrupt support
Add optional threshold interrupt support. Implemented using SENSOR_TRIG_THRESHOLD sensor trigger type. The features can be optionally enabled through Kconfig, or disabled for smaller code size. Signed-off-by: Maxime Vincent <maxime@veemax.be>
This commit is contained in:
parent
652ab7f2d4
commit
bf1334bafb
4 changed files with 154 additions and 0 deletions
|
@ -101,6 +101,9 @@ struct lis2dw12_data {
|
|||
sensor_trigger_handler_t tap_handler;
|
||||
sensor_trigger_handler_t double_tap_handler;
|
||||
#endif /* CONFIG_LIS2DW12_TAP */
|
||||
#ifdef CONFIG_LIS2DW12_THRESHOLD
|
||||
sensor_trigger_handler_t threshold_handler;
|
||||
#endif /* CONFIG_LIS2DW12_THRESHOLD */
|
||||
#if defined(CONFIG_LIS2DW12_TRIGGER_OWN_THREAD)
|
||||
K_KERNEL_STACK_MEMBER(thread_stack, CONFIG_LIS2DW12_THREAD_STACK_SIZE);
|
||||
struct k_thread thread;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue