Skip to content

Commit f279dbb

Browse files
mkleszcz-nomasz-nordic
authored andcommitted
doc: Improve documentation in index.rst and complete changelog
Signed-off-by: Marcin Kleszcz <[email protected]>
1 parent 79ad08b commit f279dbb

File tree

4 files changed

+145
-22
lines changed

4 files changed

+145
-22
lines changed
15.9 KB
Loading

doc/index.rst

Lines changed: 119 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,130 @@
11
.. _index:
22

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

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

8-
If you want to see how samples work in Zephyr, see `Samples and Demos`_ section.
10+
Overview
11+
********
12+
13+
:ref:`npmx-zephyr <index>` provides an example of `npmx library`_ integration with the `Zephyr`_ RTOS environment.
14+
This can be used as a starting point for an integration with other RTOS or bare-metal environments.
15+
16+
For the user's convenience, this repository includes also a variety of sample applications demonstrating how to use the `npmx drivers`_.
17+
Their code is available on the GitHub `npmx-zephyr repository`_.
18+
19+
Supported devices
20+
*****************
21+
22+
- nPM1300 Engineering B
23+
24+
Supported drivers
25+
*****************
26+
27+
The following matrix provides a comparative overview of which drivers are supported by specific Nordic nPMs.
28+
29+
======================= ===== ====== ========= ======= ====== ====== ===== ===== ====== ======= ========
30+
Driver ADC BUCK CHARGER EVENT GPIO LDSW LED POF SHIP TIMER VBUSIN
31+
======================= ===== ====== ========= ======= ====== ====== ===== ===== ====== ======= ========
32+
nPM1300 Engineering B ✔ ✔ ✔ ✔ ✔ ✔ ✔ ✔ ✔ ✔ ✔
33+
======================= ===== ====== ========= ======= ====== ====== ===== ===== ====== ======= ========
34+
35+
For more information about the features of a specific peripheral, refer to the official documentation of the specific nPM device.
36+
37+
How to use
38+
**********
39+
40+
Repository initialization
41+
=========================
42+
43+
The recommended way to clone the repositories is by using the ``west`` tool.
44+
Information about the installation, available commands, configuration and more can be found in the `Zephyr's west`_ tool documentation.
45+
46+
To initalize the npmx-zephyr repository, run the following commands:
47+
48+
.. code:: bash
49+
50+
mkdir <new_directory>
51+
cd <new_directory>
52+
west init -m https://github.com/NordicSemiconductor/npmx-zephyr
53+
cd npmx-zephyr
54+
west update
55+
56+
Alternatively, you can clone repositories by using git only.
57+
In this case pay special attention to revisions - both Zephyr and npmx revisions should match the ones specified in the ``west.yml``.
58+
Moreover, the ``npmx`` folder should be placed in the ``zephyr/modules`` subdirectory.
59+
60+
Building and running sample application
61+
=======================================
62+
63+
To run one of the :doc:`sample applications <samples>`, do the following:
64+
65+
* Configure the setup based on the relevant sample documentation.
66+
* Build and flash the application to the target device by using the following commands:
67+
68+
.. code:: bash
69+
70+
cd <path_to_npmx-zephyr>/samples/<desired_sample>
71+
west build -b <target>
72+
west flash
73+
74+
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.
75+
After that, run the following commands:
76+
77+
.. code:: bash
78+
79+
cd npmx-zephyr/samples/led
80+
west build -b nrf52840dk_nrf52840
81+
west flash
82+
83+
As a result, you should see LEDs blinking on the board.
84+
85+
.. note::
86+
Make sure that the ``ZEPHYR_BASE`` variable is set as a path to your Zephyr folder (the one you have cloned with west).
87+
88+
If not, set this variable manually with the following command:
89+
90+
.. code:: bash
91+
92+
export ZEPHYR_BASE=<path_to_zephyr_directory>
93+
94+
Generating documentation
95+
========================
96+
97+
All files that are required to compile the Sphinx-based documentation for the ``npmx-zephyr`` repository are located under the ``doc`` folder.
98+
99+
Requirements
100+
------------
101+
102+
Install Python 3 and its dependencies with the following command:
103+
104+
.. code:: bash
105+
106+
pip install -r scripts/requirements.txt
107+
108+
Build
109+
-----
110+
111+
You can build the documentation in two ways:
112+
113+
* Use the provided script ``doc/sphinx_build_local.sh`` and open the ``doc/build/html/index.html`` file to see the output.
114+
* Build it manually by going to the ``doc`` directory and running the following command:
115+
116+
.. code:: bash
117+
118+
sphinx-build -M html . build
9119
10120
.. toctree::
11-
:maxdepth: 1
12-
:glob:
121+
:maxdepth: 2
13122
:caption: Contents:
14123

15124
samples
125+
126+
.. toctree::
127+
:maxdepth: 1
128+
16129
additional_resources
17130
release_notes

doc/links.txt

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,13 @@
1-
.. _`Application Debugging`: https://docs.zephyrproject.org/latest/develop/application/index.html#application-debugging
21
.. _`Application Configuration`: https://docs.zephyrproject.org/latest/develop/application/index.html#application-configuration
3-
.. _`How to connect with PuTTY`: https://developer.nordicsemi.com/nRF_Connect_SDK/doc/latest/nrf/getting_started/testing.html#how-to-connect-with-putty
2+
.. _`Application Debugging`: https://docs.zephyrproject.org/latest/develop/application/index.html#application-debugging
43
.. _`Building an Application`: https://docs.zephyrproject.org/latest/develop/application/index.html#building-an-application
5-
.. _`Zephyr Getting Started Guide`: https://docs.zephyrproject.org/latest/develop/getting_started/index.html
6-
.. _`npmx library`: https://github.com/NordicSemiconductor/npmx
7-
.. _`Nordic Semiconductor - nPM1300`: https://www.nordicsemi.com/Products/nPM1300
4+
.. _`How to connect with PuTTY`: https://developer.nordicsemi.com/nRF_Connect_SDK/doc/latest/nrf/getting_started/testing.html#how-to-connect-with-putty
85
.. _`Nordic Semiconductor - Power Management ICs`: https://www.nordicsemi.com/Products/Power-Management
6+
.. _`Nordic Semiconductor - nPM1300`: https://www.nordicsemi.com/Products/nPM1300
97
.. _`Samples and Demos`: https://docs.zephyrproject.org/latest/samples/index.html
10-
.. _`npmx-zephyr repository`: https://github.com/NordicSemiconductor/npmx-zephyr
8+
.. _`Zephyr Getting Started Guide`: https://docs.zephyrproject.org/latest/develop/getting_started/index.html
119
.. _`Zephyr`: https://zephyrproject.org/
10+
.. _`npmx drivers`: https://github.com/NordicSemiconductor/npmx/tree/main/drivers
11+
.. _`npmx library`: https://github.com/NordicSemiconductor/npmx
12+
.. _`npmx-zephyr repository`: https://github.com/NordicSemiconductor/npmx-zephyr
13+
.. _`Zephyr's west`: https://docs.zephyrproject.org/latest/develop/west/index.html

doc/release_notes.rst

Lines changed: 18 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -3,19 +3,27 @@
33
Release notes
44
#############
55

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

8-
[vx.y.x] - dd/mm/yyyy
8+
[0.6.0] - 22/06/2023
99
---------------------
1010

1111
Added
1212
~~~~~
1313

14-
15-
Changed
16-
~~~~~~~
17-
18-
19-
Fixed
20-
~~~~~
21-
14+
- Added basic repository structure.
15+
- Added README.md file.
16+
- Added samples:
17+
- BUCK
18+
- CHARGER and Events
19+
- LDO
20+
- LED
21+
- POF
22+
- Shell
23+
- Simple
24+
- Timer
25+
- Wake-up Timer
26+
- Timer Watchdog
27+
- VBUSIN
28+
- Added all of the required files to build the documentation.
29+
- Added pre-commit hooks.

0 commit comments

Comments
 (0)