nRF Connect SDK API
3.4.99
Toggle main menu visibility
Loading...
Searching...
No Matches
sensor_manager.h
Go to the documentation of this file.
1
/*
2
* Copyright (c) 2021 Nordic Semiconductor ASA
3
*
4
* SPDX-License-Identifier: LicenseRef-Nordic-5-Clause
5
*/
6
7
#ifndef _SENSOR_MANAGER_H_
8
#define _SENSOR_MANAGER_H_
9
10
#ifdef __cplusplus
11
extern
"C"
{
12
#endif
13
14
#include <zephyr/device.h>
15
#include <zephyr/drivers/sensor.h>
16
#include <
caf/events/sensor_event.h
>
17
#include <
caf/caf_sensor_common.h
>
18
19
20
enum
act_type
{
21
ACT_TYPE_ABS
,
22
};
23
24
struct
sm_trigger_activation
{
25
enum
act_type
type
;
26
struct
sensor_value
thresh
;
27
unsigned
int
timeout_ms
;
28
};
29
30
struct
sm_trigger
{
31
struct
sensor_trigger
cfg
;
32
struct
sm_trigger_activation
activation
;
33
};
34
41
struct
sm_sensor_config
{
45
const
struct
device *
dev
;
52
const
char
*
event_descr
;
58
const
struct
caf_sampled_channel
*
chans
;
64
uint8_t
chan_cnt
;
72
uint8_t
active_events_limit
;
76
unsigned
int
sampling_period_ms
;
83
struct
sm_trigger
*
trigger
;
87
bool
suspend
;
88
};
89
90
#ifdef __cplusplus
91
}
92
#endif
93
94
#endif
/* _SENSOR_MANAGER_H_ */
caf_sensor_common.h
sensor_event.h
act_type
act_type
Definition
sensor_manager.h:20
ACT_TYPE_ABS
@ ACT_TYPE_ABS
Definition
sensor_manager.h:21
caf_sampled_channel
Description of single channel.
Definition
caf_sensor_common.h:39
sm_sensor_config::dev
const struct device * dev
Device.
Definition
sensor_manager.h:45
sm_sensor_config::chans
const struct caf_sampled_channel * chans
Used channels description.
Definition
sensor_manager.h:58
sm_sensor_config::chan_cnt
uint8_t chan_cnt
Number of channels.
Definition
sensor_manager.h:64
sm_sensor_config::event_descr
const char * event_descr
Event descriptor.
Definition
sensor_manager.h:52
sm_sensor_config::suspend
bool suspend
Flag to indicate whether sensor should be suspended or not.
Definition
sensor_manager.h:87
sm_sensor_config::sampling_period_ms
unsigned int sampling_period_ms
Sampling period.
Definition
sensor_manager.h:76
sm_sensor_config::active_events_limit
uint8_t active_events_limit
Allowed number of unprocessed events.
Definition
sensor_manager.h:72
sm_sensor_config::trigger
struct sm_trigger * trigger
Sensor trigger configuration.
Definition
sensor_manager.h:83
sm_sensor_config
Sensor configuration.
Definition
sensor_manager.h:41
sm_trigger_activation::thresh
struct sensor_value thresh
Definition
sensor_manager.h:26
sm_trigger_activation::type
enum act_type type
Definition
sensor_manager.h:25
sm_trigger_activation::timeout_ms
unsigned int timeout_ms
Definition
sensor_manager.h:27
sm_trigger_activation
Definition
sensor_manager.h:24
sm_trigger::activation
struct sm_trigger_activation activation
Definition
sensor_manager.h:32
sm_trigger::cfg
struct sensor_trigger cfg
Definition
sensor_manager.h:31
sm_trigger
Definition
sensor_manager.h:30
include
caf
sensor_manager.h
Generated on
for nRF Connect SDK API by
1.17.0