nRF Connect SDK API 3.3.99
Loading...
Searching...
No Matches
sensor_manager_def.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
8
9/* This configuration file is included only once from sensor_manager module and holds
10 * information about the sampled sensors.
11 */
12
13/* This structure enforces the header file is included only once in the build.
14 * Violating this requirement triggers a multiple definition error at link time.
15 */
17
18
19static const struct caf_sampled_channel accel_chan[] = {
20 {
21 .chan = SENSOR_CHAN_ACCEL_X,
22 .data_cnt = 1,
23 },
24 {
25 .chan = SENSOR_CHAN_ACCEL_Y,
26 .data_cnt = 1,
27 },
28 {
29 .chan = SENSOR_CHAN_ACCEL_Z,
30 .data_cnt = 1,
31 },
32};
33
34static const struct sm_sensor_config sensor_configs[] = {
35 {
36 .dev = DEVICE_DT_GET(DT_NODELABEL(sensor_sim)),
37 .event_descr = CONFIG_ML_APP_SENSOR_EVENT_DESCR,
38 .chans = accel_chan,
39 .chan_cnt = ARRAY_SIZE(accel_chan),
40 .sampling_period_ms = 20,
41 .active_events_limit = 3,
42 },
43};
const struct @8 sensor_manager_def_include_once
static const struct caf_sampled_channel accel_chan[]
Definition sensor_manager_def.h:19
static const struct sm_sensor_config sensor_configs[]
Definition sensor_manager_def.h:34
Description of single channel.
Definition caf_sensor_common.h:39
Sensor configuration.
Definition sensor_manager.h:41