1 /*
2  * Copyright (c) 2022 Intel Corporation
3  * Copyright (c) 2023 Google LLC
4  *
5  * SPDX-License-Identifier: Apache-2.0
6  */
7 
8 #ifndef ZEPHYR_DRIVERS_SENSOR_ICM42688_TRIGGER_H_
9 #define ZEPHYR_DRIVERS_SENSOR_ICM42688_TRIGGER_H_
10 
11 #include <zephyr/device.h>
12 
13 /** implement the trigger_set sensor api function */
14 int icm42688_trigger_set(const struct device *dev, const struct sensor_trigger *trig,
15 			 sensor_trigger_handler_t handler);
16 
17 /**
18  * @brief initialize the icm42688 trigger system
19  *
20  * @param dev icm42688 device pointer
21  * @return int 0 on success, negative error code otherwise
22  */
23 int icm42688_trigger_init(const struct device *dev);
24 
25 /**
26  * @brief enable the trigger gpio interrupt
27  *
28  * @param dev icm42688 device pointer
29  * @return int 0 on success, negative error code otherwise
30  */
31 int icm42688_trigger_enable_interrupt(const struct device *dev);
32 
33 /**
34  * @brief lock access to the icm42688 device driver
35  *
36  * @param dev icm42688 device pointer
37  */
38 void icm42688_lock(const struct device *dev);
39 
40 /**
41  * @brief lock access to the icm42688 device driver
42  *
43  * @param dev icm42688 device pointer
44  */
45 void icm42688_unlock(const struct device *dev);
46 
47 #endif /* ZEPHYR_DRIVERS_SENSOR_ICM42688_TRIGGER_H_ */
48