Lines Matching full:sensor
12 #include <zephyr/drivers/sensor.h>
16 * @defgroup sensing_sensor Sensing Sensor API
18 * @defgroup sensing_sensor_callbacks Sensor Callbacks
23 * @brief Sensing Sensor API
33 * @brief Sensor registration information
38 * Sensor flags
43 * Sample size in bytes for a single sample of the registered sensor.
49 * The number of sensor sensitivities
54 * Sensor version.
55 * Version can be used to identify different versions of sensor implementation.
72 * @brief Enumeration for sensor flag bit.
74 * This enumeration defines the bit for sensor flag.
81 * @brief Connection between a source and sink of sensor data
85 struct sensing_sensor *source; /**< Source sensor of the connection. */
86 struct sensing_sensor *sink; /**< Sink sensor of the connection. */
90 void *data; /**< Pointer to sensor sample data of the connection. */
97 * @brief Internal sensor instance data structure.
99 * Each sensor instance will have its unique data structure for storing all
102 * Sensor management will enumerate all these instance data structures,
106 const struct device *dev; /**< Device of the sensor instance. */
107 const struct sensing_sensor_info *info; /**< Info of the sensor instance. */
108 /** Register info of the sensor instance. */
110 const uint16_t reporter_num; /**< Reporter number of the sensor instance. */
111 sys_slist_t client_list; /**< List of the sensor clients. */
112 uint32_t interval; /**< Report interval of the sensor sample in micro seconds. */
113 uint8_t sensitivity_count; /**< Sensitivity count of the sensor instance. */
114 /** Sensitivity array of the sensor instance. */
116 enum sensing_sensor_state state; /**< State of the sensor instance. */
117 struct rtio_iodev *iodev; /**< Pointer to RTIO device of the sensor instance. */
120 atomic_t flag; /**< Sensor flag of the sensor instance. */
121 struct sensing_connection *conns; /**< Pointer to sensor connections. */
125 * @brief Macro to generate a name for a sensor info structure.
127 * This macro generates a name for a sensor info structure based on a node and an index.
130 * @param idx Logical index into the sensor-types array.
136 * @brief Macro to define a sensor info structure.
138 * This macro defines a sensor info structure based on a node and an index.
140 * sensor.
143 * @param idx Logical index into the sensor-types array.
167 * @brief Macro to generate a name for a sensor source.
169 * This macro generates a name for a sensor source based on an index and a node.
179 * @brief Macro to declare an external sensor source.
181 * This macro declares an external sensor source based on an index and a node.
194 * @param source_name The name of struct sensing_sensor for source sensor.
236 * @brief Structure for sensor submit configuration.
238 * This structure represents a sensor submit configuration. It includes the channel, info index, and
242 enum sensor_channel chan; /**< Channel of the sensor to submit. */
243 const int info_index; /**< Logical index into the sensor-types array. */
260 * @param idx Logical index into the sensor-types array.
266 * @brief Macro to generate a name for a sensor I/O device.
268 * This macro generates a name for a sensor I/O device based on a node and an index.
271 * @param idx Logical index into the sensor-types array.
277 * @brief Macro to define a sensor I/O device.
279 * This macro defines a sensor I/O device based on a node and an index.
283 * @param idx Logical index into the sensor-types array.
295 * @brief Macro to generate a name for a sensor.
297 * This macro generates a name for a sensor based on a node and an index.
300 * @param idx Logical index into the sensor-types array.
306 * @brief Macro to define a sensor.
308 * This macro defines a sensor based on a node, a property, an index, a register info pointer, and a
309 * callback list pointer. The sensor includes a device, info, register info, reporter number,
314 * @param idx Logical index into the sensor-types array.
335 * It uses the DT_FOREACH_PROP_ELEM_VARGS macro to define each sensor.
350 * @details Defines a sensor which implements the sensor API. May define an
351 * element in the sensing sensor iterable section used to enumerate all sensing
393 * @brief Get reporter handles of a given sensor instance by sensor type.
395 * @param dev The sensor instance device structure.
401 * sensor instances
409 * @brief Get reporters count of a given sensor instance by sensor type.
411 * @param dev The sensor instance device structure.
412 * @param type The sensor type for checking, \ref SENSING_SENSOR_TYPE_ALL
419 * @brief Get this sensor's state
421 * @param dev The sensor instance device structure.
422 * @param state Returned sensor state value