|
Zephyr API Documentation 4.4.0-rc1
A Scalable Open Source RTOS
|
Data Structures | |
| struct | sensor_driver_api |
| Driver Operations Sensor driver operations More... | |
Typedefs | |
| typedef int(* | sensor_attr_set_t) (const struct device *dev, enum sensor_channel chan, enum sensor_attribute attr, const struct sensor_value *val) |
| Callback API to set a sensor attribute. | |
| typedef int(* | sensor_attr_get_t) (const struct device *dev, enum sensor_channel chan, enum sensor_attribute attr, struct sensor_value *val) |
| Callback API to get a sensor attribute. | |
| typedef int(* | sensor_trigger_set_t) (const struct device *dev, const struct sensor_trigger *trig, sensor_trigger_handler_t handler) |
| Callback API to set a sensor trigger and handler. | |
| typedef int(* | sensor_sample_fetch_t) (const struct device *dev, enum sensor_channel chan) |
| Callback API to fetch a sensor sample into the driver buffer. | |
| typedef int(* | sensor_channel_get_t) (const struct device *dev, enum sensor_channel chan, struct sensor_value *val) |
| Callback API to read a sensor channel from the driver buffer. | |
| typedef int(* | sensor_get_decoder_t) (const struct device *dev, const struct sensor_decoder_api **api) |
| Callback API to get the sensor decoder implementation. | |
| typedef void(* | sensor_submit_t) (const struct device *sensor, struct rtio_iodev_sqe *sqe) |
| Callback API to service an RTIO submission for a sensor device. | |
This group contains the API type definitions, callback signatures, and other helpers required to implement a Sensor driver.
| typedef int(* sensor_attr_get_t) (const struct device *dev, enum sensor_channel chan, enum sensor_attribute attr, struct sensor_value *val) |
#include <zephyr/drivers/sensor.h>
Callback API to get a sensor attribute.
See sensor_attr_get() for argument description
| typedef int(* sensor_attr_set_t) (const struct device *dev, enum sensor_channel chan, enum sensor_attribute attr, const struct sensor_value *val) |
#include <zephyr/drivers/sensor.h>
Callback API to set a sensor attribute.
See sensor_attr_set() for argument description
| typedef int(* sensor_channel_get_t) (const struct device *dev, enum sensor_channel chan, struct sensor_value *val) |
#include <zephyr/drivers/sensor.h>
Callback API to read a sensor channel from the driver buffer.
See sensor_channel_get() for argument description
| typedef int(* sensor_get_decoder_t) (const struct device *dev, const struct sensor_decoder_api **api) |
#include <zephyr/drivers/sensor.h>
Callback API to get the sensor decoder implementation.
See sensor_get_decoder() for argument description
| typedef int(* sensor_sample_fetch_t) (const struct device *dev, enum sensor_channel chan) |
#include <zephyr/drivers/sensor.h>
Callback API to fetch a sensor sample into the driver buffer.
See sensor_sample_fetch_chan() for argument description
| typedef void(* sensor_submit_t) (const struct device *sensor, struct rtio_iodev_sqe *sqe) |
#include <zephyr/drivers/sensor.h>
Callback API to service an RTIO submission for a sensor device.
Invoked when the asynchronous sensor path dispatches work to the driver.
| sensor | The sensor device |
| sqe | The RTIO submission queue entry |
| typedef int(* sensor_trigger_set_t) (const struct device *dev, const struct sensor_trigger *trig, sensor_trigger_handler_t handler) |
#include <zephyr/drivers/sensor.h>
Callback API to set a sensor trigger and handler.
See sensor_trigger_set() for argument description