From c2ac45bb50586700eedb59745b2c98d018e2dea7 Mon Sep 17 00:00:00 2001 From: "Wang Xinyan (ATV MC PAI PA PSI)" Date: Fri, 27 Jun 2025 13:52:14 +0200 Subject: [PATCH 1/7] add doc check --- .github/workflows/docs.yml | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 .github/workflows/docs.yml diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml new file mode 100644 index 0000000..7042e84 --- /dev/null +++ b/.github/workflows/docs.yml @@ -0,0 +1,15 @@ +name: Build docs + +on: + push: + pull_request: + paths: + - docs/** + +concurrency: + group: ${{ github.workflow }}-${{ github.ref }} + cancel-in-progress: true + +jobs: + makers-devops: + uses: Infineon/makers-devops/.github/workflows/docs_build.yml@main \ No newline at end of file From f376b23ac217e3a1250768a43b15f9713cd610f1 Mon Sep 17 00:00:00 2001 From: "Wang Xinyan (ATV MC PAI PA PSI)" Date: Mon, 30 Jun 2025 15:08:27 +0200 Subject: [PATCH 2/7] add doc check --- .../workflows/{docs.yml => build_docs.yml} | 2 +- docs/Makefile | 21 +++++++ docs/conf.py | 55 +++++-------------- docs/make.bat | 35 ++++++++++++ docs/requirements.txt | 13 +++-- 5 files changed, 78 insertions(+), 48 deletions(-) rename .github/workflows/{docs.yml => build_docs.yml} (90%) create mode 100644 docs/Makefile create mode 100644 docs/make.bat diff --git a/.github/workflows/docs.yml b/.github/workflows/build_docs.yml similarity index 90% rename from .github/workflows/docs.yml rename to .github/workflows/build_docs.yml index 7042e84..45258c4 100644 --- a/.github/workflows/docs.yml +++ b/.github/workflows/build_docs.yml @@ -12,4 +12,4 @@ concurrency: jobs: makers-devops: - uses: Infineon/makers-devops/.github/workflows/docs_build.yml@main \ No newline at end of file + uses: Infineon/makers-devops/.github/workflows/docs_build.yml@workflows/docs-add-doxygen \ No newline at end of file diff --git a/docs/Makefile b/docs/Makefile new file mode 100644 index 0000000..a7ce0aa --- /dev/null +++ b/docs/Makefile @@ -0,0 +1,21 @@ + +# Minimal makefile for Sphinx documentation +# + +# You can set these variables from the command line, and also +# from the environment for the first two. +SPHINXOPTS ?= +SPHINXBUILD ?= sphinx-build +SOURCEDIR = . +BUILDDIR = _build + +# Put it first so that "make" without argument is like "make help". +help: + @$(SPHINXBUILD) -M help "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O) + +.PHONY: help Makefile + +# Catch-all target: route all unknown targets to Sphinx using the new +# "make mode" option. $(O) is meant as a shortcut for $(SPHINXOPTS). +%: Makefile + @$(SPHINXBUILD) -M $@ "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O) \ No newline at end of file diff --git a/docs/conf.py b/docs/conf.py index 4317f1a..29a7e1f 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -21,30 +21,21 @@ # -- Project information ----------------------------------------------------- -project = 'High-Side Switch' -copyright = '2024 Infineon Technologies AG' +project = 'Arduino MOTIX™ BTN99x0' +copyright = '2022 Infineon Technologies AG' author = 'Infineon Technologies AG' +# The full version, including alpha/beta/rc tags +release = '1.1.0' + + # -- General configuration --------------------------------------------------- # Add any Sphinx extension module names here, as strings. They can be # extensions coming with Sphinx (named 'sphinx.ext.*') or your custom # ones. -#... - -# At top on conf.py (with other import statements) -# import recommonmark -# from recommonmark.transform import AutoStructify - -# # At the bottom of conf.py -# def setup(app): -# app.add_config_value('recommonmark_config', { -# 'url_resolver': lambda url: github_doc_root + url, -# 'auto_toc_tree_section': 'Contents', -# }, True) -# app.add_transform(AutoStructify) - extensions = [ + 'sphinx_rtd_theme', 'sphinx.ext.autodoc', 'sphinxemoji.sphinxemoji', 'sphinx_tabs.tabs', @@ -60,17 +51,12 @@ 'sphinx.ext.inheritance_diagram', 'breathe', 'exhale' - ] autosectionlabel_prefix_document = True -# source_parsers = { -# '.md': 'recommonmark.parser.CommonMarkParser', -# } source_suffix = [ '.rst', - # '.md' ] suppress_warnings = ['autosectionlabel.*', 'epub.duplicated_toc_entry'] @@ -84,32 +70,24 @@ "doxygenStripFromPath": "..", # Suggested optional arguments "createTreeView": True, - # TIP: if using the sphinx-bootstrap-theme, you need - # "treeViewIsBootstrap": True, "exhaleExecutesDoxygen": True, - # "exhaleUseDoxyfile" : True, "exhaleDoxygenStdin": textwrap.dedent(''' - INPUT = ../src + INPUT = ../src GENERATE_LATEX = NO - GENERATE_HTML = YES + GENERATE_HTML = NO GENERATE_XML = YES RECURSIVE = YES - VERBATIM_HEADERS = NO - EXCLUDE = ./../src/framework/raspberrypi/examples ./../src/framework/raspberrypi/examples_py ./../src/framework/arduino/examples ./../src/framework/arduino/README.md + VERBATIM_HEADERS = YES '''), # Configure what not to show in the API index page "unabridgedOrphanKinds": {"function", "define", "dir","file", "variable", "namespace"}, "fullToctreeMaxDepth" : 4 - } # Add any paths that contain templates here, relative to this directory. templates_path = ['_templates'] -# Tell sphinx what the primary language being documented is. -primary_domain = 'cpp' - # List of patterns, relative to source directory, that match files and # directories to ignore when looking for source files. # This pattern also affects html_static_path and html_extra_path. @@ -121,13 +99,8 @@ # The theme to use for HTML and HTML Help pages. See the documentation for # a list of builtin themes. - -html_theme = 'sphinx_rtd_theme' -# html_theme_options = { -# "head_font_family" : "Source Sans Pro", -# "font_family" : "Source Sans Pro", -# "body_text_align" : "justify", -# } +# +html_theme = "sphinx_rtd_theme" html_logo = 'img/ifx_logo_white_green_s.png' @@ -139,7 +112,7 @@ # -- Breathe configuration ------------------------------------------------- breathe_projects = { - "High-Side Switch": "build/xml/" + "Arduino MOTIX™ BTN99x0": "build/xml/" } -breathe_default_project = "High-Side Switch" +breathe_default_project = "Arduino MOTIX™ BTN99x0" breathe_default_members = ('members', 'undoc-members') \ No newline at end of file diff --git a/docs/make.bat b/docs/make.bat new file mode 100644 index 0000000..7b5d91f --- /dev/null +++ b/docs/make.bat @@ -0,0 +1,35 @@ +@ECHO OFF + +pushd %~dp0 + +REM Command file for Sphinx documentation + +if "%SPHINXBUILD%" == "" ( + set SPHINXBUILD=sphinx-build +) +set SOURCEDIR=. +set BUILDDIR=_build + +if "%1" == "" goto help + +%SPHINXBUILD% >NUL 2>NUL +if errorlevel 9009 ( + echo. + echo.The 'sphinx-build' command was not found. Make sure you have Sphinx + echo.installed, then set the SPHINXBUILD environment variable to point + echo.to the full path of the 'sphinx-build' executable. Alternatively you + echo.may add the Sphinx directory to PATH. + echo. + echo.If you don't have Sphinx installed, grab it from + echo.https://www.sphinx-doc.org/ + exit /b 1 +) + +%SPHINXBUILD% -M %1 %SOURCEDIR% %BUILDDIR% %SPHINXOPTS% %O% +goto end + +:help +%SPHINXBUILD% -M help %SOURCEDIR% %BUILDDIR% %SPHINXOPTS% %O% + +:end +popd \ No newline at end of file diff --git a/docs/requirements.txt b/docs/requirements.txt index 790202b..02f7cfb 100644 --- a/docs/requirements.txt +++ b/docs/requirements.txt @@ -1,8 +1,9 @@ -sphinx>=7.2.6 -sphinx-rtd-theme>=0.5.0 -sphinx-sitemap>=2.2.0 -recommonmark>=0.6.0 -sphinxemoji>=0.1.8 +Sphinx +sphinx-rtd-theme +sphinx-sitemap +recommonmark +sphinxemoji sphinx-tabs -breathe>=4.13.0 +breathe exhale + From afa30c06ee2f08b994292efdb127205fb37b672d Mon Sep 17 00:00:00 2001 From: Xinyan Wang <152802227+wxyyy0117@users.noreply.github.com> Date: Wed, 2 Jul 2025 11:05:09 +0200 Subject: [PATCH 3/7] Update README.md --- README.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index a80667e..e7c1544 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,7 @@ # Smart High-Side Switch +[![Build docs](https://github.com/Infineon/high-side-switch/actions/workflows/build_docs.yml/badge.svg?branch=adddocscheck)](https://github.com/Infineon/high-side-switch/actions/workflows/build_docs.yml) + C++ library for Infineon's Arduino shields for **PROFET™ Smart High-Side Power Switches** Automotive grade ## Supported Products @@ -50,4 +52,4 @@ The complete documentation of the library as well as detailed information about ## License -This project is licensed under the MIT License - click [here](https://github.com/Infineon/high-side-switch/blob/master/LICENSE) for details. \ No newline at end of file +This project is licensed under the MIT License - click [here](https://github.com/Infineon/high-side-switch/blob/master/LICENSE) for details. From 8fa46a18e90b4ad09908c6f2c3383761cd6561ed Mon Sep 17 00:00:00 2001 From: "Wang Xinyan (ATV MC PAI PA PSI)" Date: Mon, 30 Jun 2025 15:08:27 +0200 Subject: [PATCH 4/7] add doc check --- .../workflows/{docs.yml => build_docs.yml} | 2 +- docs/Makefile | 21 +++++++ docs/conf.py | 55 +++++-------------- docs/make.bat | 35 ++++++++++++ docs/requirements.txt | 13 +++-- 5 files changed, 78 insertions(+), 48 deletions(-) rename .github/workflows/{docs.yml => build_docs.yml} (90%) create mode 100644 docs/Makefile create mode 100644 docs/make.bat diff --git a/.github/workflows/docs.yml b/.github/workflows/build_docs.yml similarity index 90% rename from .github/workflows/docs.yml rename to .github/workflows/build_docs.yml index 7042e84..45258c4 100644 --- a/.github/workflows/docs.yml +++ b/.github/workflows/build_docs.yml @@ -12,4 +12,4 @@ concurrency: jobs: makers-devops: - uses: Infineon/makers-devops/.github/workflows/docs_build.yml@main \ No newline at end of file + uses: Infineon/makers-devops/.github/workflows/docs_build.yml@workflows/docs-add-doxygen \ No newline at end of file diff --git a/docs/Makefile b/docs/Makefile new file mode 100644 index 0000000..a7ce0aa --- /dev/null +++ b/docs/Makefile @@ -0,0 +1,21 @@ + +# Minimal makefile for Sphinx documentation +# + +# You can set these variables from the command line, and also +# from the environment for the first two. +SPHINXOPTS ?= +SPHINXBUILD ?= sphinx-build +SOURCEDIR = . +BUILDDIR = _build + +# Put it first so that "make" without argument is like "make help". +help: + @$(SPHINXBUILD) -M help "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O) + +.PHONY: help Makefile + +# Catch-all target: route all unknown targets to Sphinx using the new +# "make mode" option. $(O) is meant as a shortcut for $(SPHINXOPTS). +%: Makefile + @$(SPHINXBUILD) -M $@ "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O) \ No newline at end of file diff --git a/docs/conf.py b/docs/conf.py index 4317f1a..fdd011a 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -21,30 +21,21 @@ # -- Project information ----------------------------------------------------- -project = 'High-Side Switch' -copyright = '2024 Infineon Technologies AG' +project = 'HIGH-SIDE-SWITCH' +copyright = '2022 Infineon Technologies AG' author = 'Infineon Technologies AG' +# The full version, including alpha/beta/rc tags +release = '1.1.0' + + # -- General configuration --------------------------------------------------- # Add any Sphinx extension module names here, as strings. They can be # extensions coming with Sphinx (named 'sphinx.ext.*') or your custom # ones. -#... - -# At top on conf.py (with other import statements) -# import recommonmark -# from recommonmark.transform import AutoStructify - -# # At the bottom of conf.py -# def setup(app): -# app.add_config_value('recommonmark_config', { -# 'url_resolver': lambda url: github_doc_root + url, -# 'auto_toc_tree_section': 'Contents', -# }, True) -# app.add_transform(AutoStructify) - extensions = [ + 'sphinx_rtd_theme', 'sphinx.ext.autodoc', 'sphinxemoji.sphinxemoji', 'sphinx_tabs.tabs', @@ -60,17 +51,12 @@ 'sphinx.ext.inheritance_diagram', 'breathe', 'exhale' - ] autosectionlabel_prefix_document = True -# source_parsers = { -# '.md': 'recommonmark.parser.CommonMarkParser', -# } source_suffix = [ '.rst', - # '.md' ] suppress_warnings = ['autosectionlabel.*', 'epub.duplicated_toc_entry'] @@ -84,32 +70,24 @@ "doxygenStripFromPath": "..", # Suggested optional arguments "createTreeView": True, - # TIP: if using the sphinx-bootstrap-theme, you need - # "treeViewIsBootstrap": True, "exhaleExecutesDoxygen": True, - # "exhaleUseDoxyfile" : True, "exhaleDoxygenStdin": textwrap.dedent(''' - INPUT = ../src + INPUT = ../src GENERATE_LATEX = NO - GENERATE_HTML = YES + GENERATE_HTML = NO GENERATE_XML = YES RECURSIVE = YES - VERBATIM_HEADERS = NO - EXCLUDE = ./../src/framework/raspberrypi/examples ./../src/framework/raspberrypi/examples_py ./../src/framework/arduino/examples ./../src/framework/arduino/README.md + VERBATIM_HEADERS = YES '''), # Configure what not to show in the API index page "unabridgedOrphanKinds": {"function", "define", "dir","file", "variable", "namespace"}, "fullToctreeMaxDepth" : 4 - } # Add any paths that contain templates here, relative to this directory. templates_path = ['_templates'] -# Tell sphinx what the primary language being documented is. -primary_domain = 'cpp' - # List of patterns, relative to source directory, that match files and # directories to ignore when looking for source files. # This pattern also affects html_static_path and html_extra_path. @@ -121,13 +99,8 @@ # The theme to use for HTML and HTML Help pages. See the documentation for # a list of builtin themes. - -html_theme = 'sphinx_rtd_theme' -# html_theme_options = { -# "head_font_family" : "Source Sans Pro", -# "font_family" : "Source Sans Pro", -# "body_text_align" : "justify", -# } +# +html_theme = "sphinx_rtd_theme" html_logo = 'img/ifx_logo_white_green_s.png' @@ -139,7 +112,7 @@ # -- Breathe configuration ------------------------------------------------- breathe_projects = { - "High-Side Switch": "build/xml/" + "HIGH-SIDE-SWITCH": "build/xml/" } -breathe_default_project = "High-Side Switch" +breathe_default_project = "HIGH-SIDE-SWITCH" breathe_default_members = ('members', 'undoc-members') \ No newline at end of file diff --git a/docs/make.bat b/docs/make.bat new file mode 100644 index 0000000..7b5d91f --- /dev/null +++ b/docs/make.bat @@ -0,0 +1,35 @@ +@ECHO OFF + +pushd %~dp0 + +REM Command file for Sphinx documentation + +if "%SPHINXBUILD%" == "" ( + set SPHINXBUILD=sphinx-build +) +set SOURCEDIR=. +set BUILDDIR=_build + +if "%1" == "" goto help + +%SPHINXBUILD% >NUL 2>NUL +if errorlevel 9009 ( + echo. + echo.The 'sphinx-build' command was not found. Make sure you have Sphinx + echo.installed, then set the SPHINXBUILD environment variable to point + echo.to the full path of the 'sphinx-build' executable. Alternatively you + echo.may add the Sphinx directory to PATH. + echo. + echo.If you don't have Sphinx installed, grab it from + echo.https://www.sphinx-doc.org/ + exit /b 1 +) + +%SPHINXBUILD% -M %1 %SOURCEDIR% %BUILDDIR% %SPHINXOPTS% %O% +goto end + +:help +%SPHINXBUILD% -M help %SOURCEDIR% %BUILDDIR% %SPHINXOPTS% %O% + +:end +popd \ No newline at end of file diff --git a/docs/requirements.txt b/docs/requirements.txt index 790202b..02f7cfb 100644 --- a/docs/requirements.txt +++ b/docs/requirements.txt @@ -1,8 +1,9 @@ -sphinx>=7.2.6 -sphinx-rtd-theme>=0.5.0 -sphinx-sitemap>=2.2.0 -recommonmark>=0.6.0 -sphinxemoji>=0.1.8 +Sphinx +sphinx-rtd-theme +sphinx-sitemap +recommonmark +sphinxemoji sphinx-tabs -breathe>=4.13.0 +breathe exhale + From d5c13bc989a3fcfc64f69dabd9ee7f4719fa582d Mon Sep 17 00:00:00 2001 From: Xinyan Wang <152802227+wxyyy0117@users.noreply.github.com> Date: Fri, 4 Jul 2025 15:19:43 +0200 Subject: [PATCH 5/7] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index e7c1544..6b19b1b 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ # Smart High-Side Switch -[![Build docs](https://github.com/Infineon/high-side-switch/actions/workflows/build_docs.yml/badge.svg?branch=adddocscheck)](https://github.com/Infineon/high-side-switch/actions/workflows/build_docs.yml) +[![Build docs](https://github.com/Infineon/high-side-switch/actions/workflows/build_docs.yml/badge.svg)](https://github.com/Infineon/high-side-switch/actions/workflows/build_docs.yml) C++ library for Infineon's Arduino shields for **PROFET™ Smart High-Side Power Switches** Automotive grade From ef2bad1afa6efe0091ca3e336ad24a8048d3cd71 Mon Sep 17 00:00:00 2001 From: Julian Eder Date: Wed, 16 Jul 2025 13:42:05 +0200 Subject: [PATCH 6/7] docs/conf.py: Remove hardcoded release tag. --- docs/conf.py | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/docs/conf.py b/docs/conf.py index 2d8fb82..d3fb1e6 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -25,10 +25,6 @@ copyright = '2024 Infineon Technologies AG' author = 'Infineon Technologies AG' -# The full version, including alpha/beta/rc tags -release = '1.1.0' - - # -- General configuration --------------------------------------------------- # Add any Sphinx extension module names here, as strings. They can be @@ -115,4 +111,4 @@ "Arduino MOTIX™ BTN99x0": "build/xml/" } breathe_default_project = "Arduino MOTIX™ BTN99x0" -breathe_default_members = ('members', 'undoc-members') \ No newline at end of file +breathe_default_members = ('members', 'undoc-members') From 2d8cfbbfb539ef331d33b02d86138e50b39da7dd Mon Sep 17 00:00:00 2001 From: Julian Eder Date: Wed, 16 Jul 2025 13:45:25 +0200 Subject: [PATCH 7/7] Update docs/requirements.txt Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> --- docs/requirements.txt | 1 - 1 file changed, 1 deletion(-) diff --git a/docs/requirements.txt b/docs/requirements.txt index 02f7cfb..c6078a1 100644 --- a/docs/requirements.txt +++ b/docs/requirements.txt @@ -1,7 +1,6 @@ Sphinx sphinx-rtd-theme sphinx-sitemap -recommonmark sphinxemoji sphinx-tabs breathe