Zephyr API Documentation  3.6.0
A Scalable Open Source RTOS
3.6.0
All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Modules Pages
sensing_sensor.h File Reference
#include <stdbool.h>
#include <zephyr/device.h>
#include <zephyr/drivers/sensor.h>
#include <zephyr/sensing/sensing.h>

Go to the source code of this file.

Data Structures

struct  sensing_sensor_register_info
 Sensor registration information. More...
 
struct  sensing_connection
 Connection between a source and sink of sensor data. More...
 
struct  sensing_sensor
 Internal sensor instance data structure. More...
 
struct  sensing_submit_config
 

Macros

#define SENSING_SENSOR_INFO_NAME(node, idx)    _CONCAT(_CONCAT(__sensing_sensor_info_, idx), DEVICE_DT_NAME_GET(node))
 
#define SENSING_SENSOR_INFO_DEFINE(node, idx)
 
#define SENSING_CONNECTIONS_NAME(node)    _CONCAT(__sensing_connections_, DEVICE_DT_NAME_GET(node))
 
#define SENSING_SENSOR_SOURCE_NAME(idx, node)
 
#define SENSING_SENSOR_SOURCE_EXTERN(idx, node)   extern struct sensing_sensor SENSING_SENSOR_SOURCE_NAME(idx, node); \
 
#define SENSING_CONNECTION_INITIALIZER(source_name, cb_list_ptr)
 
#define SENSING_CONNECTION_DEFINE(idx, node, cb_list_ptr)
 
#define SENSING_CONNECTIONS_DEFINE(node, num, cb_list_ptr)
 
#define SENSING_SUBMIT_CFG_NAME(node, idx)    _CONCAT(_CONCAT(__sensing_submit_cfg_, idx), DEVICE_DT_NAME_GET(node))
 
#define SENSING_SENSOR_IODEV_NAME(node, idx)    _CONCAT(_CONCAT(__sensing_iodev_, idx), DEVICE_DT_NAME_GET(node))
 
#define SENSING_SENSOR_IODEV_DEFINE(node, idx)
 
#define SENSING_SENSOR_NAME(node, idx)    _CONCAT(_CONCAT(__sensing_sensor_, idx), DEVICE_DT_NAME_GET(node))
 
#define SENSING_SENSOR_DEFINE(node, prop, idx, reg_ptr, cb_list_ptr)
 
#define SENSING_SENSORS_DEFINE(node, reg_ptr, cb_list_ptr)
 
#define SENSING_SENSORS_DT_DEFINE(node, reg_ptr, cb_list_ptr, init_fn, pm_device, data_ptr, cfg_ptr, level, prio, api_ptr, ...)
 Like SENSOR_DEVICE_DT_DEFINE() with sensing specifics.
 
#define SENSING_SENSORS_DT_INST_DEFINE(inst, ...)    SENSING_SENSORS_DT_DEFINE(DT_DRV_INST(inst), __VA_ARGS__)
 Like SENSING_SENSORS_DT_DEFINE() for an instance of a DT_DRV_COMPAT compatible.
 

Enumerations

enum  { EVENT_CONFIG_READY }
 
enum  { SENSOR_LATER_CFG_BIT }
 

Functions

int sensing_sensor_get_reporters (const struct device *dev, int type, sensing_sensor_handle_t *reporter_handles, int max_handles)
 Get reporter handles of a given sensor instance by sensor type.
 
int sensing_sensor_get_reporters_count (const struct device *dev, int type)
 Get reporters count of a given sensor instance by sensor type.
 
int sensing_sensor_get_state (const struct device *dev, enum sensing_sensor_state *state)
 Get this sensor's state.