diff --git a/doc/_static/images/npm_family_logo_primary.png b/doc/_static/images/npm_family_logo_primary.png new file mode 100644 index 00000000..2e982d74 Binary files /dev/null and b/doc/_static/images/npm_family_logo_primary.png differ diff --git a/doc/index.rst b/doc/index.rst index b3d55886..0d25e415 100644 --- a/doc/index.rst +++ b/doc/index.rst @@ -1,17 +1,130 @@ .. _index: -Welcome to `npmx-zephyr`! -######################### +.. image:: _static/images/npm_family_logo_primary.png + :align: center + :width: 200 -:ref:`npmx-zephyr ` 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 ` 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 + cd + 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 `, 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 /samples/ + west build -b + 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= + +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 diff --git a/doc/links.txt b/doc/links.txt index 03f82870..d59ade51 100644 --- a/doc/links.txt +++ b/doc/links.txt @@ -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 diff --git a/doc/release_notes.rst b/doc/release_notes.rst index b87ce2f9..82f2ace4 100644 --- a/doc/release_notes.rst +++ b/doc/release_notes.rst @@ -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.