Skip to content

Commit 4d111fb

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 4d111fb

File tree

2 files changed

+47
-0
lines changed

2 files changed

+47
-0
lines changed

doc/nrf-bm/api/api.rst

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -128,6 +128,8 @@ Record Access Control Point
128128
Sensor data simulator library
129129
=============================
130130

131+
.. _api_sensorsim:
132+
131133
.. doxygengroup:: sensorsim
132134
:inner:
133135
:members:

doc/nrf-bm/libraries/sensorsim.rst

Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
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+
23+
Initialization
24+
==============
25+
26+
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.
27+
For details on the configuration see the :c:struct:`sensorsim_cfg` structure.
28+
29+
Usage
30+
*****
31+
32+
After initialization, the :c:func:`sensorsim_measure` function can be called to generate a triangular wave generated sensor measurement.
33+
34+
Dependencies
35+
************
36+
37+
This library does not have any dependencies.
38+
39+
API documentation
40+
*****************
41+
42+
| Header file: :file:`include/sensorsim.h`
43+
| Source files: :file:`lib/bsensorsim/`
44+
45+
:ref:`Sensorsim library API reference <api_sensorsim>`

0 commit comments

Comments
 (0)