Skip to content

Commit

Permalink
doc: Improve documentation in index.rst and complete changelog
Browse files Browse the repository at this point in the history
Signed-off-by: Marcin Kleszcz <marcin.kleszcz@nordicsemi.no>
  • Loading branch information
mkleszcz-no authored and masz-nordic committed Jun 22, 2023
1 parent 79ad08b commit f279dbb
Show file tree
Hide file tree
Showing 4 changed files with 145 additions and 22 deletions.
Binary file added doc/_static/images/npm_family_logo_primary.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
125 changes: 119 additions & 6 deletions doc/index.rst
Original file line number Diff line number Diff line change
@@ -1,17 +1,130 @@
.. _index:

Welcome to `npmx-zephyr`!
#########################
.. image:: _static/images/npm_family_logo_primary.png
:align: center
:width: 200

:ref:`npmx-zephyr <index>` is a repository showcasing the integration of `npmx library`_ into an RTOS environment, using `Zephyr`_ RTOS as an example.
npmx-zephyr
###########

If you want to see how samples work in Zephyr, see `Samples and Demos`_ section.
Overview
********

:ref:`npmx-zephyr <index>` provides an example of `npmx library`_ integration with the `Zephyr`_ RTOS environment.
This can be used as a starting point for an integration with other RTOS or bare-metal environments.

For the user's convenience, this repository includes also a variety of sample applications demonstrating how to use the `npmx drivers`_.
Their code is available on the GitHub `npmx-zephyr repository`_.

Supported devices
*****************

- nPM1300 Engineering B

Supported drivers
*****************

The following matrix provides a comparative overview of which drivers are supported by specific Nordic nPMs.

======================= ===== ====== ========= ======= ====== ====== ===== ===== ====== ======= ========
Driver ADC BUCK CHARGER EVENT GPIO LDSW LED POF SHIP TIMER VBUSIN
======================= ===== ====== ========= ======= ====== ====== ===== ===== ====== ======= ========
nPM1300 Engineering B ✔ ✔ ✔ ✔ ✔ ✔ ✔ ✔ ✔ ✔ ✔
======================= ===== ====== ========= ======= ====== ====== ===== ===== ====== ======= ========

For more information about the features of a specific peripheral, refer to the official documentation of the specific nPM device.

How to use
**********

Repository initialization
=========================

The recommended way to clone the repositories is by using the ``west`` tool.
Information about the installation, available commands, configuration and more can be found in the `Zephyr's west`_ tool documentation.

To initalize the npmx-zephyr repository, run the following commands:

.. code:: bash
mkdir <new_directory>
cd <new_directory>
west init -m https://github.com/NordicSemiconductor/npmx-zephyr
cd npmx-zephyr
west update
Alternatively, you can clone repositories by using git only.
In this case pay special attention to revisions - both Zephyr and npmx revisions should match the ones specified in the ``west.yml``.
Moreover, the ``npmx`` folder should be placed in the ``zephyr/modules`` subdirectory.

Building and running sample application
=======================================

To run one of the :doc:`sample applications <samples>`, do the following:

* Configure the setup based on the relevant sample documentation.
* Build and flash the application to the target device by using the following commands:

.. code:: bash
cd <path_to_npmx-zephyr>/samples/<desired_sample>
west build -b <target>
west flash
For instance, if you want to run the LED sample for nPM1300 Engineering B used with nRF52840DK, you must configure the setup as specified in the :doc:`LED sample <../samples/led/README>` description.
After that, run the following commands:

.. code:: bash
cd npmx-zephyr/samples/led
west build -b nrf52840dk_nrf52840
west flash
As a result, you should see LEDs blinking on the board.

.. note::
Make sure that the ``ZEPHYR_BASE`` variable is set as a path to your Zephyr folder (the one you have cloned with west).

If not, set this variable manually with the following command:

.. code:: bash
export ZEPHYR_BASE=<path_to_zephyr_directory>
Generating documentation
========================

All files that are required to compile the Sphinx-based documentation for the ``npmx-zephyr`` repository are located under the ``doc`` folder.

Requirements
------------

Install Python 3 and its dependencies with the following command:

.. code:: bash
pip install -r scripts/requirements.txt
Build
-----

You can build the documentation in two ways:

* Use the provided script ``doc/sphinx_build_local.sh`` and open the ``doc/build/html/index.html`` file to see the output.
* Build it manually by going to the ``doc`` directory and running the following command:

.. code:: bash
sphinx-build -M html . build
.. toctree::
:maxdepth: 1
:glob:
:maxdepth: 2
:caption: Contents:

samples

.. toctree::
:maxdepth: 1

additional_resources
release_notes
14 changes: 8 additions & 6 deletions doc/links.txt
Original file line number Diff line number Diff line change
@@ -1,11 +1,13 @@
.. _`Application Debugging`: https://docs.zephyrproject.org/latest/develop/application/index.html#application-debugging
.. _`Application Configuration`: https://docs.zephyrproject.org/latest/develop/application/index.html#application-configuration
.. _`How to connect with PuTTY`: https://developer.nordicsemi.com/nRF_Connect_SDK/doc/latest/nrf/getting_started/testing.html#how-to-connect-with-putty
.. _`Application Debugging`: https://docs.zephyrproject.org/latest/develop/application/index.html#application-debugging
.. _`Building an Application`: https://docs.zephyrproject.org/latest/develop/application/index.html#building-an-application
.. _`Zephyr Getting Started Guide`: https://docs.zephyrproject.org/latest/develop/getting_started/index.html
.. _`npmx library`: https://github.com/NordicSemiconductor/npmx
.. _`Nordic Semiconductor - nPM1300`: https://www.nordicsemi.com/Products/nPM1300
.. _`How to connect with PuTTY`: https://developer.nordicsemi.com/nRF_Connect_SDK/doc/latest/nrf/getting_started/testing.html#how-to-connect-with-putty
.. _`Nordic Semiconductor - Power Management ICs`: https://www.nordicsemi.com/Products/Power-Management
.. _`Nordic Semiconductor - nPM1300`: https://www.nordicsemi.com/Products/nPM1300
.. _`Samples and Demos`: https://docs.zephyrproject.org/latest/samples/index.html
.. _`npmx-zephyr repository`: https://github.com/NordicSemiconductor/npmx-zephyr
.. _`Zephyr Getting Started Guide`: https://docs.zephyrproject.org/latest/develop/getting_started/index.html
.. _`Zephyr`: https://zephyrproject.org/
.. _`npmx drivers`: https://github.com/NordicSemiconductor/npmx/tree/main/drivers
.. _`npmx library`: https://github.com/NordicSemiconductor/npmx
.. _`npmx-zephyr repository`: https://github.com/NordicSemiconductor/npmx-zephyr
.. _`Zephyr's west`: https://docs.zephyrproject.org/latest/develop/west/index.html
28 changes: 18 additions & 10 deletions doc/release_notes.rst
Original file line number Diff line number Diff line change
Expand Up @@ -3,19 +3,27 @@
Release notes
#############

See the release notes for the information about specific npmx zephyr support releases.
See the release notes for the information about specific npmx-zephyr releases.

[vx.y.x] - dd/mm/yyyy
[0.6.0] - 22/06/2023
---------------------

Added
~~~~~


Changed
~~~~~~~


Fixed
~~~~~

- Added basic repository structure.
- Added README.md file.
- Added samples:
- BUCK
- CHARGER and Events
- LDO
- LED
- POF
- Shell
- Simple
- Timer
- Wake-up Timer
- Timer Watchdog
- VBUSIN
- Added all of the required files to build the documentation.
- Added pre-commit hooks.

0 comments on commit f279dbb

Please sign in to comment.