Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit ca685bf

Browse files
gmarullcarlescufi
authored andcommitted
doc: add breathe and import existing Doxygen groups
In Zephyr, most APIs in Doxygen are also imported in Sphinx using the breathe exstension. While breathe is de-facto unmaintained, this comes handy to have an integrated documentation experience. User is warned to check the maintainership status of breathe, because Doxygen in standalone mode (also offered) may be enough. Signed-off-by: Gerard Marull-Paretas <gerard@teslabs.com>
1 parent e955b55 commit ca685bf

File tree

8 files changed

+61
-6
lines changed

8 files changed

+61
-6
lines changed

‎doc/Doxyfile‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1003,7 +1003,7 @@ EXCLUDE_PATTERNS =
10031003
# Note that the wildcards are matched against the file with absolute path, so to
10041004
# exclude all test directories use the pattern */test/*
10051005

1006-
EXCLUDE_SYMBOLS =
1006+
EXCLUDE_SYMBOLS = z_impl_*
10071007

10081008
# The EXAMPLE_PATH tag can be used to specify one or more files or directories
10091009
# that contain example code fragments that are included (see the \include
@@ -2177,7 +2177,7 @@ MAN_LINKS = NO
21772177
# captures the structure of the code including all documentation.
21782178
# The default value is: NO.
21792179

2180-
GENERATE_XML = NO
2180+
GENERATE_XML = YES
21812181

21822182
# The XML_OUTPUT tag is used to specify where the XML pages will be put. If a
21832183
# relative path is entered the value of OUTPUT_DIRECTORY will be put in front of

‎doc/conf.py‎

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,13 +14,11 @@
1414
# -- General configuration ---------------------------------------------------
1515
# https://www.sphinx-doc.org/en/master/usage/configuration.html#general-configuration
1616

17-
extensions = ['sphinx.ext.intersphinx']
17+
extensions = ['sphinx.ext.intersphinx', 'breathe']
1818

1919
templates_path = ['_templates']
2020
exclude_patterns = ['_build_sphinx', 'Thumbs.db', '.DS_Store']
2121

22-
23-
2422
# -- Options for HTML output -------------------------------------------------
2523
# https://www.sphinx-doc.org/en/master/usage/configuration.html#options-for-html-output
2624

@@ -30,3 +28,13 @@
3028
# https://www.sphinx-doc.org/en/master/usage/extensions/intersphinx.html
3129

3230
intersphinx_mapping = {'zephyr': ('https://docs.zephyrproject.org/latest/', None)}
31+
32+
## -- Options for Breathe ----------------------------------------------------
33+
# https://breathe.readthedocs.io/en/latest/index.html
34+
#
35+
# WARNING: please, check breathe maintainership status before using this
36+
# extension in production!
37+
38+
breathe_projects = {'example-application': '_build_doxygen/xml'}
39+
breathe_default_project = 'example-application'
40+
breathe_default_members = ('members', )

‎doc/drivers/blink.rst‎

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
Blink
2+
=====
3+
4+
.. doxygengroup:: drivers_blink
5+
6+
Driver operations
7+
-----------------
8+
9+
.. doxygengroup:: drivers_blink_ops
10+
11+
Public API
12+
----------
13+
14+
.. doxygengroup:: drivers_blink_api

‎doc/drivers/index.rst‎

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
Drivers
2+
=======
3+
4+
.. doxygengroup:: drivers
5+
6+
.. toctree::
7+
:maxdepth: 1
8+
9+
blink

‎doc/index.rst‎

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,10 @@ Welcome to Example Application's documentation!
88

99
.. toctree::
1010
:maxdepth: 2
11-
:caption: Contents:
11+
:caption: Contents
12+
13+
drivers/index
14+
lib/index
1215

1316
This is a simple Sphinx documentation setup for ``example-application``. You can
1417
reference Zephyr documentation items, like

‎doc/lib/custom.rst‎

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
Custom
2+
======
3+
4+
.. doxygengroup:: lib_custom
5+
:desc-only:
6+
7+
Public API
8+
----------
9+
10+
.. doxygengroup:: lib_custom
11+
:content-only:

‎doc/lib/index.rst‎

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
Libraries
2+
=========
3+
4+
.. doxygengroup:: lib
5+
6+
.. toctree::
7+
:maxdepth: 1
8+
9+
custom

‎doc/requirements.txt‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,2 @@
11
Sphinx
2+
breathe

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /