zephyr/drivers/sensor/ina23x/ina23x_trigger.h

24 lines
565 B
C
Raw Normal View History

/*
* Copyright (c) 2022 Grinn
*
* SPDX-License-Identifier: Apache-2.0
*/
#ifndef ZEPHYR_DRIVERS_SENSOR_INA23X_TRIGGER_H_
#define ZEPHYR_DRIVERS_SENSOR_INA23X_TRIGGER_H_
#include <zephyr/drivers/gpio.h>
#include <zephyr/drivers/sensor.h>
#include <zephyr/kernel.h>
struct ina23x_trigger {
struct gpio_callback gpio_cb;
struct k_work conversion_work;
sensor_trigger_handler_t handler_alert;
};
int ina23x_trigger_mode_init(struct ina23x_trigger *trigg,
const struct gpio_dt_spec *gpio_alert);
#endif /* ZEPHYR_DRIVERS_SENSOR_INA23X_TRIGGER_H_ */