1 /* 2 * Copyright (c) 2022 Grinn 3 * 4 * SPDX-License-Identifier: Apache-2.0 5 */ 6 7 #ifndef ZEPHYR_DRIVERS_SENSOR_INA23X_TRIGGER_H_ 8 #define ZEPHYR_DRIVERS_SENSOR_INA23X_TRIGGER_H_ 9 10 #include <zephyr/drivers/gpio.h> 11 #include <zephyr/drivers/sensor.h> 12 #include <zephyr/kernel.h> 13 14 struct ina23x_trigger { 15 struct gpio_callback gpio_cb; 16 struct k_work conversion_work; 17 sensor_trigger_handler_t handler_alert; 18 const struct sensor_trigger *trig_alert; 19 }; 20 21 int ina23x_trigger_mode_init(struct ina23x_trigger *trigg, 22 const struct gpio_dt_spec *alert_gpio); 23 24 #endif /* ZEPHYR_DRIVERS_SENSOR_INA23X_TRIGGER_H_ */ 25