Skip to content

Commit 2c8df69

Browse files
doc: nrf-bm: lib: add documentation for sensor simulator library
Add documentation for sensor simulator library. Signed-off-by: Eivind Jølsgard <[email protected]>
1 parent 3033a26 commit 2c8df69

File tree

2 files changed

+46
-0
lines changed

2 files changed

+46
-0
lines changed

doc/nrf-bm/api/api.rst

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -125,6 +125,8 @@ Record Access Control Point
125125
:inner:
126126
:members:
127127

128+
.. _api_sensorsim:
129+
128130
Sensor data simulator library
129131
=============================
130132

doc/nrf-bm/libraries/sensorsim.rst

Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
.. _lib_sensorsim:
2+
3+
Sensor Simulator
4+
################
5+
6+
.. contents::
7+
:local:
8+
:depth: 2
9+
10+
Overview
11+
********
12+
13+
The sensor simulator library provides functionality for simulating sensor data.
14+
It currently supports only a triangular waveform simulator.
15+
16+
Configuration
17+
*************
18+
19+
The library is enabled using the Kconfig system.
20+
Set the :kconfig:option:`CONFIG_SENSORSIM` Kconfig option to enable the library.
21+
22+
Initialization
23+
==============
24+
25+
A sensor simulator instance is initialized by calling the :c:func:`sensorsim_init` function, providing a configuration for the minimal, maximum, and start value, plus the increment between each measurement.
26+
For details on the configuration see the :c:struct:`sensorsim_cfg` structure.
27+
28+
Usage
29+
*****
30+
31+
After initialization, the :c:func:`sensorsim_measure` function can be called to generate a triangular wave generated sensor measurement.
32+
33+
Dependencies
34+
************
35+
36+
This library does not have any dependencies.
37+
38+
API documentation
39+
*****************
40+
41+
| Header file: :file:`include/sensorsim.h`
42+
| Source files: :file:`lib/sensorsim/`
43+
44+
:ref:`Sensorsim library API reference <api_sensorsim>`

0 commit comments

Comments
 (0)