1#!/usr/bin/env python3 2 3from pathlib import Path 4import re 5 6 7CONF_DIR = Path(__file__).absolute().parent 8"""conf.py directory.""" 9 10with open(CONF_DIR / ".." / "nrfx.doxyfile") as f: 11 VERSION = re.search(r'PROJECT_NUMBER\s+=\s+"(.*)"', f.read()).group(1) 12 13# General configuration -------------------------------------------------------- 14 15project = "nrfx" 16copyright = "2021, Nordic Semiconductor ASA" 17author = "Nordic Semiconductor" 18version = VERSION 19 20extensions = ["breathe", "m2r2"] 21source_suffix = { 22 ".rst": "restructuredtext", 23 ".md": "markdown" 24} 25master_doc = "index" 26exclude_patterns = ["theme"] 27 28# Options for HTML output ------------------------------------------------------ 29 30html_theme = "sphinx_ncs_theme" 31html_static_path = [str(CONF_DIR / "_static")] 32html_last_updated_fmt = "%b %d, %Y" 33html_show_sphinx = False 34 35# Options for Breathe ---------------------------------------------------------- 36 37breathe_projects = {"nrfx": str(CONF_DIR / ".." / "xml")} 38breathe_default_project = "nrfx" 39breathe_domain_by_extension = {"h": "c", "c": "c"} 40breathe_separate_member_pages = True 41 42c_id_attributes = [ 43 "NRF_STATIC_INLINE", 44 "NRFY_STATIC_INLINE", 45 "NRFX_STATIC_INLINE", 46 "__STATIC_INLINE", 47] 48cpp_id_attributes = c_id_attributes 49 50def setup(app): 51 app.add_css_file("css/nrfx.css") 52