Lines Matching full:sensor
21 #define for_each_sensor(sensor) \ argument
22 STRUCT_SECTION_FOREACH(sensing_sensor, sensor)
24 #define for_each_sensor_reverse(sensor) \ argument
27 for (struct sensing_sensor *sensor = STRUCT_SECTION_END(sensing_sensor) \
29 ({ __ASSERT(sensor >= STRUCT_SECTION_START(sensing_sensor), \
31 sensor >= STRUCT_SECTION_START(sensing_sensor); }); \
32 sensor--)
35 #define for_each_client_conn(sensor, client) \ argument
36 SYS_SLIST_FOR_EACH_CONTAINER(&sensor->client_list, client, snode)
52 int open_sensor(struct sensing_sensor *sensor, struct sensing_connection **conn);
63 STRUCT_SECTION_FOREACH(sensing_sensor, sensor) { in get_sensor_by_dev()
64 if (sensor->dev == dev) { in get_sensor_by_dev()
65 return sensor; in get_sensor_by_dev()
69 __ASSERT(true, "device %s is not a sensing sensor", dev->name); in get_sensor_by_dev()
74 static inline struct sensing_sensor *get_reporter_sensor(struct sensing_sensor *sensor, int index) in get_reporter_sensor() argument
76 if (!sensor || index >= sensor->reporter_num) { in get_reporter_sensor()
80 return sensor->conns[index].source; in get_reporter_sensor()
85 __ASSERT(conn, "get sensor info, connection not be NULL"); in get_sensor_info()
87 __ASSERT(conn->source, "get sensor info, sensing_sensor is NULL"); in get_sensor_info()
103 static inline bool is_sensor_state_ready(struct sensing_sensor *sensor) in is_sensor_state_ready() argument
105 return (sensor->state == SENSING_SENSOR_STATE_READY); in is_sensor_state_ready()