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