Zephyr Project API 3.7.0
A Scalable Open Source RTOS
|
#include <zephyr/sensing/sensing_datatypes.h>
#include <zephyr/sensing/sensing_sensor_types.h>
#include <zephyr/device.h>
Go to the source code of this file.
Data Structures | |
struct | sensing_sensor_version |
Sensor Version. More... | |
struct | sensing_sensor_info |
Sensor basic constant information. More... | |
struct | sensing_callback_list |
Sensing subsystem event callback list. More... | |
struct | sensing_sensor_config |
Sensing subsystem sensor configure, including interval, sensitivity, latency. More... | |
Macros | |
#define | SENSING_SENSOR_VERSION(_major, _minor, _hotfix, _build) |
Macro to create a sensor version value. | |
#define | SENSING_SENSOR_FLAG_REPORT_ON_EVENT BIT(0) |
Sensor flag indicating if this sensor is on event reporting data. | |
#define | SENSING_SENSOR_FLAG_REPORT_ON_CHANGE BIT(1) |
Sensor flag indicating if this sensor is on change reporting data. | |
#define | SENSING_SENSITIVITY_INDEX_ALL -1 |
SENSING_SENSITIVITY_INDEX_ALL indicating sensitivity of each data field should be set. | |
Typedefs | |
typedef void * | sensing_sensor_handle_t |
Define Sensing subsystem sensor handle. | |
typedef void(* | sensing_data_event_t) (sensing_sensor_handle_t handle, const void *buf, void *context) |
Sensor data event receive callback. | |
Enumerations | |
enum | sensing_sensor_state { SENSING_SENSOR_STATE_READY = 0 , SENSING_SENSOR_STATE_OFFLINE = 1 } |
Sensing subsystem sensor state. More... | |
enum | sensing_sensor_attribute { SENSING_SENSOR_ATTRIBUTE_INTERVAL = 0 , SENSING_SENSOR_ATTRIBUTE_SENSITIVITY = 1 , SENSING_SENSOR_ATTRIBUTE_LATENCY = 2 , SENSING_SENSOR_ATTRIBUTE_MAX } |
Sensing subsystem sensor config attribute. More... | |
Functions | |
int | sensing_get_sensors (int *num_sensors, const struct sensing_sensor_info **info) |
Get all supported sensor instances' information. | |
int | sensing_open_sensor (const struct sensing_sensor_info *info, struct sensing_callback_list *cb_list, sensing_sensor_handle_t *handle) |
Open sensor instance by sensing sensor info. | |
int | sensing_open_sensor_by_dt (const struct device *dev, struct sensing_callback_list *cb_list, sensing_sensor_handle_t *handle) |
Open sensor instance by device. | |
int | sensing_close_sensor (sensing_sensor_handle_t *handle) |
Close sensor instance. | |
int | sensing_set_config (sensing_sensor_handle_t handle, struct sensing_sensor_config *configs, int count) |
Set current config items to Sensing subsystem. | |
int | sensing_get_config (sensing_sensor_handle_t handle, struct sensing_sensor_config *configs, int count) |
Get current config items from Sensing subsystem. | |
const struct sensing_sensor_info * | sensing_get_sensor_info (sensing_sensor_handle_t handle) |
Get sensor information from sensor instance handle. | |