From efcb72dcd5dcc0dda4fd2e5abc1a6faaff20ca83 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Eivind=20J=C3=B8lsgard?= Date: Thu, 9 Oct 2025 15:02:20 +0200 Subject: [PATCH] doc: nrf-bm: lib: add documentation for sensor simulator library MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Add documentation for sensor simulator library. Signed-off-by: Eivind Jølsgard --- doc/nrf-bm/api/api.rst | 2 + doc/nrf-bm/libraries/sensorsim.rst | 44 +++++++++++++++++++ .../release_notes/release_notes_changelog.rst | 2 +- 3 files changed, 47 insertions(+), 1 deletion(-) create mode 100644 doc/nrf-bm/libraries/sensorsim.rst diff --git a/doc/nrf-bm/api/api.rst b/doc/nrf-bm/api/api.rst index e7fd6138eb..653d0acf5e 100644 --- a/doc/nrf-bm/api/api.rst +++ b/doc/nrf-bm/api/api.rst @@ -127,6 +127,8 @@ Record Access Control Point :inner: :members: +.. _api_sensorsim: + Sensor data simulator library ============================= diff --git a/doc/nrf-bm/libraries/sensorsim.rst b/doc/nrf-bm/libraries/sensorsim.rst new file mode 100644 index 0000000000..374fd625cf --- /dev/null +++ b/doc/nrf-bm/libraries/sensorsim.rst @@ -0,0 +1,44 @@ +.. _lib_sensorsim: + +Sensor Simulator +################ + +.. contents:: + :local: + :depth: 2 + +The sensor simulator library provides functionality for simulating sensor data for testing and development purposes. + +It currently supports simulating data using a triangular waveform. + +Configuration +************* + +The library is enabled using the Kconfig system. +Set the :kconfig:option:`CONFIG_SENSORSIM` Kconfig option to enable the library. + +Initialization +============== + +To initialize a sensor simulator instance, use the :c:func:`sensorsim_init` function. +The function requires providing a configuration for the minimal, maximum, and starting values, as well as the increment between each measurement. + +For details on the configuration parameters, see the :c:struct:`sensorsim_cfg` structure. + +Usage +***** + +After initialization, you can call the :c:func:`sensorsim_measure` function to generate measurements based on a triangular waveform. + +Dependencies +************ + +This library does not have any dependencies. + +API documentation +***************** + +| Header file: :file:`include/bm/sensorsim.h` +| Source files: :file:`lib/sensorsim/` + +:ref:`Sensor data simulator library API reference ` diff --git a/doc/nrf-bm/release_notes/release_notes_changelog.rst b/doc/nrf-bm/release_notes/release_notes_changelog.rst index e45bfb731e..aa8e6ee9c8 100644 --- a/doc/nrf-bm/release_notes/release_notes_changelog.rst +++ b/doc/nrf-bm/release_notes/release_notes_changelog.rst @@ -108,4 +108,4 @@ No changes since the latest nRF Connect SDK Bare Metal release. Documentation ============= -No changes since the latest nRF Connect SDK Bare Metal release. +* Added documentation for the :ref:`lib_sensorsim` library.