diff --git a/.readthedocs.yaml b/.readthedocs.yaml new file mode 100644 index 000000000..0a59c2ed1 --- /dev/null +++ b/.readthedocs.yaml @@ -0,0 +1,20 @@ +# .readthedocs.yaml +# Read the Docs configuration file +# See https://docs.readthedocs.io/en/stable/config-file/v2.html for details + +# Required +version: 2 + +# Set the version of Python and other tools you might need +build: + os: ubuntu-22.04 + tools: + python: "3.10" + +# Build documentation in the docs/ directory with Sphinx +sphinx: + configuration: docs/conf.py + +python: + install: + - requirements: docs/requirements.txt diff --git a/docs/.gitignore b/docs/.gitignore new file mode 100644 index 000000000..69fa449dd --- /dev/null +++ b/docs/.gitignore @@ -0,0 +1 @@ +_build/ diff --git a/docs/Makefile b/docs/Makefile new file mode 100644 index 000000000..d4bb2cbb9 --- /dev/null +++ b/docs/Makefile @@ -0,0 +1,20 @@ +# 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) diff --git a/docs/_templates/.gitkeep b/docs/_templates/.gitkeep new file mode 100644 index 000000000..e69de29bb diff --git a/docs/arduino-deviations.rst b/docs/arduino-deviations.rst new file mode 100644 index 000000000..84df06081 --- /dev/null +++ b/docs/arduino-deviations.rst @@ -0,0 +1,9 @@ +Arduino API Deviations +************************ + +.. TODO: document any deviations from the standard Arduino API. + +Digital IO +=========== + +.. TODO diff --git a/docs/conf.py b/docs/conf.py new file mode 100644 index 000000000..6045bba47 --- /dev/null +++ b/docs/conf.py @@ -0,0 +1,62 @@ +# Copyright (c) Infineon Technologies AG +# +# SPDX-License-Identifier: Apache-2.0 + +# Configuration file for the Sphinx documentation builder. +# +# This file only contains a selection of the most common options. For a full +# list see the documentation: +# http://www.sphinx-doc.org/en/master/config + +# -- Path setup -------------------------------------------------------------- + +import os + +# Check if we're running on Read the Docs' servers +read_the_docs_build = os.environ.get("READTHEDOCS", None) == "True" + +# -- Project information ----------------------------------------------------- + +project = "Arduino Core for Zephyr" +copyright = "2026 Infineon Technologies AG" +author = "Infineon Technologies AG" + +# -- General configuration --------------------------------------------------- + +extensions = [ + "sphinx_tabs.tabs", + "sphinxemoji.sphinxemoji", + "myst_parser", +] + +autosectionlabel_prefix_document = True + +source_suffix = [ + ".rst", +] + +suppress_warnings = ["autosectionlabel.*", "epub.duplicated_toc_entry"] + +# 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. +exclude_patterns = ["_build", "build", "Thumbs.db", ".DS_Store"] + +highlight_language = "c++" + +# -- Options for HTML output ------------------------------------------------- + +# The theme to use for HTML and HTML Help pages. See the documentation for +# a list of builtin themes. +html_theme = "sphinx_rtd_theme" + +# Add any paths that contain custom static files (such as style sheets) here, +# relative to this directory. They are copied after the builtin static files, +# so a file named "default.css" will overwrite the builtin "default.css". +html_static_path = ["_templates"] diff --git a/docs/contributing.rst b/docs/contributing.rst new file mode 100644 index 000000000..ee25f588d --- /dev/null +++ b/docs/contributing.rst @@ -0,0 +1,4 @@ +Contributing +************* + +.. TODO: contribution guidelines. diff --git a/docs/env-setup.rst b/docs/env-setup.rst new file mode 100644 index 000000000..d66a20949 --- /dev/null +++ b/docs/env-setup.rst @@ -0,0 +1,4 @@ +Environment Setup +******************* + +.. TODO: development environment setup instructions. diff --git a/docs/hw-platforms.rst b/docs/hw-platforms.rst new file mode 100644 index 000000000..3f43ee61a --- /dev/null +++ b/docs/hw-platforms.rst @@ -0,0 +1,9 @@ +Supported Boards +****************** + +.. TODO: list supported boards, one section per board. + +KIT-PSE84-AI +============= + +.. TODO diff --git a/docs/index.rst b/docs/index.rst new file mode 100644 index 000000000..4c532c517 --- /dev/null +++ b/docs/index.rst @@ -0,0 +1,29 @@ +************************* +Arduino Core for Zephyr +************************* + +Welcome to the Arduino Core for Infineon's Zephyr-based microcontrollers. + +.. toctree:: + :maxdepth: 2 + :caption: CONTENT + + Introduction + installation-instructions + hw-platforms + arduino-deviations + +.. toctree:: + :maxdepth: 1 + :caption: CONTRIBUTING + :hidden: + + Introduction + env-setup + run-tests + +License +======= + +Please find the license file for this core `here +`_. diff --git a/docs/installation-instructions.rst b/docs/installation-instructions.rst new file mode 100644 index 000000000..58411f7fe --- /dev/null +++ b/docs/installation-instructions.rst @@ -0,0 +1,14 @@ +Installation Instructions +************************** + +.. TODO: fill in installation steps. + +Integration in Arduino IDE +=========================== + +.. TODO + +Installation in Arduino CLI +============================= + +.. TODO diff --git a/docs/make.bat b/docs/make.bat new file mode 100644 index 000000000..954237b9b --- /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 + +%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 +) + +if "%1" == "" goto help + +%SPHINXBUILD% -M %1 %SOURCEDIR% %BUILDDIR% %SPHINXOPTS% %O% +goto end + +:help +%SPHINXBUILD% -M help %SOURCEDIR% %BUILDDIR% %SPHINXOPTS% %O% + +:end +popd diff --git a/docs/requirements.txt b/docs/requirements.txt new file mode 100644 index 000000000..cf0cc4a32 --- /dev/null +++ b/docs/requirements.txt @@ -0,0 +1,7 @@ +# This is a list of python packages used to generate documentation. This file is used with pip: +# pip install --user -r requirements.txt +sphinx>=7.2.6,<9.0.0 +sphinx-tabs +sphinxemoji +sphinx-rtd-theme +myst_parser diff --git a/docs/run-tests.rst b/docs/run-tests.rst new file mode 100644 index 000000000..096e5b8fe --- /dev/null +++ b/docs/run-tests.rst @@ -0,0 +1,4 @@ +Running Tests +************** + +.. TODO: how to run the test suite (see tests/README.md).