diff --git a/.github/workflows/doc.yml b/.github/workflows/doc.yml new file mode 100644 index 0000000..05363dc --- /dev/null +++ b/.github/workflows/doc.yml @@ -0,0 +1,30 @@ +name: Documentation + +on: [push, pull_request] + +jobs: + BuildDocs: + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v2 + - name: Set up Python 3.7 + uses: actions/setup-python@v2 + with: + python-version: 3.7 + + - name: Install dependencies + run: | + sudo apt install -y python3-numpy + pip install -r CI/doc/requirements_doc.txt + - name: Check doc build + run: | + make -C CI/doc gen_autodocs html + + - name: Publish master doc + if: github.ref == 'refs/heads/master' + uses: peaceiris/actions-gh-pages@v3 + with: + github_token: ${{ secrets.GITHUB_TOKEN }} + publish_dir: ./CI/doc/build/html + destination_dir: master diff --git a/CI/ci_flags.md b/CI/ci_flags.md new file mode 100644 index 0000000..b8ee9e5 --- /dev/null +++ b/CI/ci_flags.md @@ -0,0 +1,7 @@ +# CI Signaling + +Its possible to configure CI on build a project based on flags in the commit message. This is done by adding a special line to the commit that starts with CI: (must be all caps). The line can contain a list of flags separated by semi-colons. The following flags are supported: +- skip= +- skip_branch=: +- enable_only_branch=: +- env:= diff --git a/CI/doc/Makefile b/CI/doc/Makefile new file mode 100644 index 0000000..f85851c --- /dev/null +++ b/CI/doc/Makefile @@ -0,0 +1,26 @@ +# 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 = source +BUILDDIR = build + +PYTHON = python + +# 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) + +gen_autodocs: + cd gen_pages ; \ + $(PYTHON) gen_sysobj_pages.py diff --git a/CI/doc/README_doc.md b/CI/doc/README_doc.md new file mode 100644 index 0000000..5d1ea87 --- /dev/null +++ b/CI/doc/README_doc.md @@ -0,0 +1,24 @@ +# Doc Creation + +Doc is create by leveraging Sphinx as the documentation engine. To create the entire documentation set you must generate the dynamic pages which document the system object APIs and the reference designs. Then the output targets can be run. Since doc gen requires sphinx and some plugins they need to be installed first and ideally in a virtual environment. The following commands will create a virtual environment and install the necessary packages: + +```bash +python3 -m venv venv +source venv/bin/activate +pip install -r CI/doc/requirements_doc.txt +``` + +Next we can build the documentation. The following commands will build the documentation and place it in the *build* folder under the *CI/doc* folder: + +```bash +make -C CI/doc gen_autodocs html +``` + +## Updating the System Object Documentation + +The system object documentation is generated from the MATLAB code and comments, which requires use of MATLAB itself. By running the script gen_sysobj_doc.m within the *gen_pages* folder, it will create the necessary sysobjs.json file which sphinx will then use to create the individual component pages. This is done by running the following command from the root of the toolbox in MATLAB: + +```matlab +cd CI/doc/gen_pages +gen_sysobj_doc +``` diff --git a/CI/doc/gen_pages/Makefile b/CI/doc/gen_pages/Makefile new file mode 100644 index 0000000..e7b54bc --- /dev/null +++ b/CI/doc/gen_pages/Makefile @@ -0,0 +1,14 @@ +# Define the Python interpreter +PYTHON = python + +# Define the targets and their dependencies +all: gen_sysobj_pages gen_rd_svg gen_hdl_refdesigns + +gen_sysobj_pages: + $(PYTHON) gen_sysobj_pages.py + +gen_rd_svg: + $(PYTHON) gen_rd_svg.py + +gen_hdl_refdesigns: + $(PYTHON) gen_hdl_refdesigns.py \ No newline at end of file diff --git a/CI/doc/gen_pages/_templates/allsysobjs.tmpl b/CI/doc/gen_pages/_templates/allsysobjs.tmpl new file mode 100644 index 0000000..16a0b8b --- /dev/null +++ b/CI/doc/gen_pages/_templates/allsysobjs.tmpl @@ -0,0 +1,19 @@ +# Hardware Interface APIs + +Available hardware streaming interfaces in ToolboxCommon: + + +```{eval-rst} +.. toctree:: + :maxdepth: 1 +{% for obj in devices %} + sysobjects/{{ obj }} +{%- endfor %} + +``` + + + +Click on left table of contents for individual component pages. \ No newline at end of file diff --git a/CI/doc/gen_pages/_templates/sysobj.html b/CI/doc/gen_pages/_templates/sysobj.html new file mode 100644 index 0000000..2bd6e66 --- /dev/null +++ b/CI/doc/gen_pages/_templates/sysobj.html @@ -0,0 +1,94 @@ +{% block content %} +# {{ obj.name }} + + + + + + +
+ +{{ obj.dec }} + + +
+ +
Creation
+ +The class can be instantiated in the following way with and without property name value pairs. + +```matlab +dev = {{ obj.name }} +dev = {{ obj.name }}(Name, Value) +``` + +
Properties
+ +
+ +Unless otherwise indicated, properties are non-tunable, which means you cannot change their values after calling the object. Objects lock when you call them, and the release function unlocks them. +

+If a property is tunable, you can change its value at any time. +

+For more information on changing property values, see System Design in MATLAB Using System Objects. +
+
+
+ + +{% for prop in obj.props %} +:::{dropdown} {{ prop.prop_name }} +{{ prop.prop_description }} +::: +{% endfor -%} + + + + +{% endblock %} + +
+
Example Usage
+ +```matlab +{% if obj.type == "Tx" %} +%% Configure device +tx = {{ obj.name }}; +tx.uri = 'ip:analog.local'; +{% if obj.name == "adi.ADRV9002.Tx" %} +tx.CenterFrequencyChannel0 = 1e9; +{% else %} +tx.CenterFrequency = 1e9; +{% endif %} +tx.DataSource = 'DMA'; +tx.EnableCyclicBuffers = true; +tx.EnabledChannels = 1; +%% Generate tone +amplitude = 2^15; frequency = 0.12e6; +swv1 = dsp.SineWave(amplitude, frequency); +swv1.ComplexOutput = true; +swv1.SamplesPerFrame = 2^14; +swv1.SampleRate = tx.SamplingRate; +y = swv1(); +% Send +tx(y); +{% else %} +%% Rx set up +rx = {{ obj.name }}('uri','ip:analog.local'); +{% if obj.name == "adi.ADRV9002.Rx" %} +rx.CenterFrequencyChannel0 = 1e9; +{% else %} +rx.CenterFrequency = 1e9; +{% endif %} +rx.EnabledChannels = 1; +%% Run +for k=1:10 + valid = false; + while ~valid + [out, valid] = rx(); + end +end +{% endif %} +``` diff --git a/CI/doc/gen_pages/gen_sysobj_doc.m b/CI/doc/gen_pages/gen_sysobj_doc.m new file mode 100644 index 0000000..eb6ffe8 --- /dev/null +++ b/CI/doc/gen_pages/gen_sysobj_doc.m @@ -0,0 +1,74 @@ +[filepath,name,ext] = fileparts(mfilename('fullpath')); +cd(filepath); +cd('..'); +files = dir(filepath); + +mfiledir = fullfile('adi'); +docdir = fullfile('doc'); + +rootClasses = {... + {'Attribute'},... + {'DDS'},... + {'Tx'},... + {'BufferADI'},... + {'Channel'},... + {'DDS'},... + {'DebugAttribute'},... + {'DeviceAttribute'},... + {'RegisterReadWrite'},... + {'Rx'},... + {'RxTx'},... + {'Sensor'},... + }; + +all_devs = []; +for ii = 1:numel(rootClasses) + part = rootClasses{ii}{1}; + all_props = []; + dotmfilename = strcat(part); + props = properties(dotmfilename); + for prop = 1:length(props) + + if props{prop} == "enIO" + continue; + end + pdoc = help(strcat(dotmfilename,'.',props{prop})); + + pdocs = strsplit(pdoc,'\n'); + prop_title = pdocs{1}; + prop_description = strip(replace(strjoin(pdocs(2:end),'\n'),'\n','')); + prop_description = int32(prop_description); + prop_description(prop_description==10) = []; + prop_description(prop_description==13) = []; + prop_description = char(prop_description); + prop_description = replace(prop_description,' ',' '); + prop_description = replace(prop_description,' ',' '); + + s = struct('prop_name',props{prop},... + 'prop_title',prop_title,... + 'prop_description',prop_description); + all_props = [all_props,s]; + end + top_doc = help(dotmfilename); + top_doc = strsplit(top_doc,'\n'); + top_doc = replace(top_doc,'\n','
'); + top_doc = strjoin(top_doc(2:end),'
'); + +% top_doc = strip(replace(top_doc,'\n','')); +% top_doc = int32(top_doc); +% top_doc(top_doc==10) = []; +% top_doc(top_doc==13) = []; +% top_doc = char(top_doc); +% top_doc = replace(top_doc,' ',' '); +% top_doc = replace(top_doc,' ',' '); + + + oname = struct('name',dotmfilename, 'dec',top_doc, 'props',all_props); + all_devs = [all_devs, oname]; +end +%% +jsonText = jsonencode(all_devs,'PrettyPrint',true); +fid = fopen('docs/sysobjs.json', 'w'); +fprintf(fid, '%s', jsonText); +fclose(fid); + diff --git a/CI/doc/gen_pages/gen_sysobj_pages.py b/CI/doc/gen_pages/gen_sysobj_pages.py new file mode 100644 index 0000000..2a18d2a --- /dev/null +++ b/CI/doc/gen_pages/gen_sysobj_pages.py @@ -0,0 +1,101 @@ +from jinja2 import Environment, FileSystemLoader +import os +import json + + +def gen_sys_obj_pages(matlab): + + folder_of_this_file = os.path.dirname(__file__) + + source_folder = os.path.join(folder_of_this_file, "..", "source") + + _generated_folder = os.path.join(folder_of_this_file, "..", "source", "_generated") + if not os.path.exists(_generated_folder): + os.mkdir(_generated_folder) + + sys_obj_gen_folder = os.path.join(_generated_folder, "sysobjects") + if not os.path.exists(sys_obj_gen_folder): + os.mkdir(sys_obj_gen_folder) + + + template_filename = "sysobj.html" + + # Data for template + if not os.path.exists("sysobjs.json"): + raise Exception("sysobjs.json not found. Run gen_sysobj_doc.m first.") + with open("sysobjs.json") as f: + objs = json.load(f) + + # Import template + loc = os.path.dirname(__file__) + loc = os.path.join(loc, "_templates") + file_loader = FileSystemLoader(loc) + env = Environment(loader=file_loader) + + loc = os.path.join(template_filename) + template = env.get_template(loc) + + devices = {} + + def cleanup(obj): + + obj["dec"] = obj["dec"].replace("192.168.2.1", "ip:192.168.2.1") + d = obj["dec"] + ol = [] + for d in obj["dec"].split("
"): + + if "See also" in d: + continue + if "Documentation for" in d: + continue + if "doc adi." in d: + continue + + ol.append(d) + + obj["dec"] = "
".join(ol) + if ".Rx" in obj["name"]: + obj["type"] = "Rx" + else: + obj["type"] = "Tx" + + return obj + + for obj in objs: + print("Generating doc page for", obj["name"]) + # Render template + obj = cleanup(obj) + output = template.render(obj=obj, disable_nav=matlab) + # Write output + output_filename = os.path.join(sys_obj_gen_folder, f"{obj['name']}.md") + # output_filename = f"sysobjects/{obj['name']}.md" + loc = os.path.join(output_filename) + f = open(loc, "w") + f.write(output) + f.close() + devices[obj["name"]] = output_filename + + # Create allsysobjs.md + loc = os.path.join("allsysobjs.tmpl") + template = env.get_template(loc) + output = template.render(devices=devices, disable_nav=matlab) + + loc = os.path.join(_generated_folder, "objects.md") + with open(loc, "w") as f: + f.write(output) + + + if matlab: + # Generate index for objs + loc = os.path.join("allsysobjs.tmpl") + template = env.get_template(loc) + output = template.render(devices=devices, disable_nav=matlab) + + loc = os.path.join("objects.md") + with open(loc, "w") as f: + f.write(output) + + return devices + +if __name__ == "__main__": + gen_sys_obj_pages(False) diff --git a/CI/doc/gen_pages/sysobjs.json b/CI/doc/gen_pages/sysobjs.json new file mode 100644 index 0000000..8f44916 --- /dev/null +++ b/CI/doc/gen_pages/sysobjs.json @@ -0,0 +1,569 @@ +[ + { + "name": "Attribute", + "dec": " Documentation for Attribute
doc Attribute
", + "props": [ + { + "prop_name": "uri", + "prop_title": " URI - remote host URI", + "prop_description": "Hostname or IP address of remote libIIO deviceHelp for Attribute/uri is inherited from superclass matlabshared.libiio.base" + }, + { + "prop_name": "SamplesPerFrame", + "prop_title": " Frame size", + "prop_description": "Size of the frame in samplesHelp for Attribute/SamplesPerFrame is inherited from superclass matlabshared.libiio.base" + }, + { + "prop_name": "devName", + "prop_title": " Device name", + "prop_description": "Name of the libIIO deviceHelp for Attribute/devName is inherited from superclass matlabshared.libiio.base" + }, + { + "prop_name": "kernelBuffersCount", + "prop_title": " Kernel buffers count", + "prop_description": "The number of buffers allocated in the kernel for data transfersHelp for Attribute/kernelBuffersCount is inherited from superclass matlabshared.libiio.base" + }, + { + "prop_name": "dataTypeStr", + "prop_title": " Data type for the output data", + "prop_description": "A String Representing the data typeHelp for Attribute/dataTypeStr is inherited from superclass matlabshared.libiio.base" + }, + { + "prop_name": "channelCount", + "prop_title": " Number of channels", + "prop_description": "Number of enabled channelsHelp for Attribute/channelCount is inherited from superclass matlabshared.libiio.base" + }, + { + "prop_name": "DataTimeout", + "prop_title": " Timeout for I/O", + "prop_description": "Timeout for I/O operations (in seconds) 0 = non-blocking (or default context timeout) Inf = infiniteHelp for Attribute/DataTimeout is inherited from superclass matlabshared.libiio.base" + } + ] + }, + { + "name": "DDS", + "dec": " Documentation for DDS
doc DDS
DDS Blockset Documentation
doc DDS
", + "props": [ + { + "prop_name": "DataSource", + "prop_title": " DataSource Data Source", + "prop_description": "Data source, specified as one of the following: 'DMA' — Specify the host as the source of the data. 'DDS' — Specify the DDS on the radio hardware as the source of the data. In this case, each channel has two additive tones." + }, + { + "prop_name": "DDSFrequencies", + "prop_title": " DDSFrequencies DDS Frequencies", + "prop_description": "Frequencies values in Hz of the DDS tone generators. For complex data devices the input is a [2xN] matrix where N is the available channels on the board. For complex data devices this is at most max(EnabledChannels)*2. For non-complex data devices this is at most max(EnabledChannels). If N < this upper limit, other DDSs are not set." + }, + { + "prop_name": "DDSScales", + "prop_title": " DDSScales DDS Scales", + "prop_description": "Scale of DDS tones in range [0,1]. For complex data devices the input is a [2xN] matrix where N is the available channels on the board. For complex data devices this is at most max(EnabledChannels)*2. For non-complex data devices this is at most max(EnabledChannels). If N < this upper limit, other DDSs are not set." + }, + { + "prop_name": "DDSPhases", + "prop_title": " DDSPhases DDS Phases", + "prop_description": "Phases of DDS tones in range [0,360000]. For complex data devices the input is a [2xN] matrix where N is the available channels on the board. For complex data devices this is at most max(EnabledChannels)*2. For non-complex data devices this is at most max(EnabledChannels). If N < this upper limit, other DDSs are not set." + }, + { + "prop_name": "EnableCyclicBuffers", + "prop_title": " EnableCyclicBuffers Enable Cyclic Buffers", + "prop_description": "Enable Cyclic Buffers, configures transmit buffers to be cyclic, which makes them continuously repeat" + }, + { + "prop_name": "EnabledChannels", + "prop_title": "DDS/EnabledChannels is a property.", + "prop_description": "" + }, + { + "prop_name": "uri", + "prop_title": " URI - remote host URI", + "prop_description": "Hostname or IP address of remote libIIO deviceHelp for DDS/uri is inherited from superclass matlabshared.libiio.base" + }, + { + "prop_name": "SamplesPerFrame", + "prop_title": " Frame size", + "prop_description": "Size of the frame in samplesHelp for DDS/SamplesPerFrame is inherited from superclass matlabshared.libiio.base" + }, + { + "prop_name": "devName", + "prop_title": " Device name", + "prop_description": "Name of the libIIO deviceHelp for DDS/devName is inherited from superclass matlabshared.libiio.base" + }, + { + "prop_name": "kernelBuffersCount", + "prop_title": " Kernel buffers count", + "prop_description": "The number of buffers allocated in the kernel for data transfersHelp for DDS/kernelBuffersCount is inherited from superclass matlabshared.libiio.base" + }, + { + "prop_name": "dataTypeStr", + "prop_title": " Data type for the output data", + "prop_description": "A String Representing the data typeHelp for DDS/dataTypeStr is inherited from superclass matlabshared.libiio.base" + }, + { + "prop_name": "channelCount", + "prop_title": " Number of channels", + "prop_description": "Number of enabled channelsHelp for DDS/channelCount is inherited from superclass matlabshared.libiio.base" + }, + { + "prop_name": "DataTimeout", + "prop_title": " Timeout for I/O", + "prop_description": "Timeout for I/O operations (in seconds) 0 = non-blocking (or default context timeout) Inf = infiniteHelp for DDS/DataTimeout is inherited from superclass matlabshared.libiio.base" + } + ] + }, + { + "name": "Tx", + "dec": " Documentation for Tx
doc Tx
", + "props": [ + { + "prop_name": "EnabledChannels", + "prop_title": " EnabledChannels Enabled Channels", + "prop_description": "Indexs of channels to be enabled. Input should be a [1xN] vector with the indexes of channels to be enabled. Order is irrelevant" + }, + { + "prop_name": "uri", + "prop_title": " URI - remote host URI", + "prop_description": "Hostname or IP address of remote libIIO deviceHelp for Tx/uri is inherited from superclass matlabshared.libiio.base" + }, + { + "prop_name": "SamplesPerFrame", + "prop_title": " Frame size", + "prop_description": "Size of the frame in samplesHelp for Tx/SamplesPerFrame is inherited from superclass matlabshared.libiio.base" + }, + { + "prop_name": "devName", + "prop_title": " Device name", + "prop_description": "Name of the libIIO deviceHelp for Tx/devName is inherited from superclass matlabshared.libiio.base" + }, + { + "prop_name": "kernelBuffersCount", + "prop_title": " Kernel buffers count", + "prop_description": "The number of buffers allocated in the kernel for data transfersHelp for Tx/kernelBuffersCount is inherited from superclass matlabshared.libiio.base" + }, + { + "prop_name": "dataTypeStr", + "prop_title": " Data type for the output data", + "prop_description": "A String Representing the data typeHelp for Tx/dataTypeStr is inherited from superclass matlabshared.libiio.base" + }, + { + "prop_name": "DataSource", + "prop_title": " DataSource Data Source", + "prop_description": "Data source, specified as one of the following: 'DMA' — Specify the host as the source of the data. 'DDS' — Specify the DDS on the radio hardware as the source of the data. In this case, each channel has two additive tones.Help for Tx/DataSource is inherited from superclass adi.common.DDS" + }, + { + "prop_name": "DDSFrequencies", + "prop_title": " DDSFrequencies DDS Frequencies", + "prop_description": "Frequencies values in Hz of the DDS tone generators. For complex data devices the input is a [2xN] matrix where N is the available channels on the board. For complex data devices this is at most max(EnabledChannels)*2. For non-complex data devices this is at most max(EnabledChannels). If N < this upper limit, other DDSs are not set.Help for Tx/DDSFrequencies is inherited from superclass adi.common.DDS" + }, + { + "prop_name": "DDSScales", + "prop_title": " DDSScales DDS Scales", + "prop_description": "Scale of DDS tones in range [0,1]. For complex data devices the input is a [2xN] matrix where N is the available channels on the board. For complex data devices this is at most max(EnabledChannels)*2. For non-complex data devices this is at most max(EnabledChannels). If N < this upper limit, other DDSs are not set.Help for Tx/DDSScales is inherited from superclass adi.common.DDS" + }, + { + "prop_name": "DDSPhases", + "prop_title": " DDSPhases DDS Phases", + "prop_description": "Phases of DDS tones in range [0,360000]. For complex data devices the input is a [2xN] matrix where N is the available channels on the board. For complex data devices this is at most max(EnabledChannels)*2. For non-complex data devices this is at most max(EnabledChannels). If N < this upper limit, other DDSs are not set.Help for Tx/DDSPhases is inherited from superclass adi.common.DDS" + }, + { + "prop_name": "EnableCyclicBuffers", + "prop_title": " EnableCyclicBuffers Enable Cyclic Buffers", + "prop_description": "Enable Cyclic Buffers, configures transmit buffers to be cyclic, which makes them continuously repeatHelp for Tx/EnableCyclicBuffers is inherited from superclass adi.common.DDS" + } + ] + }, + { + "name": "BufferADI", + "dec": " Documentation for BufferADI
doc BufferADI
", + "props": [ + { + "prop_name": "uri", + "prop_title": " URI - remote host URI", + "prop_description": "Hostname or IP address of remote libIIO deviceHelp for BufferADI/uri is inherited from superclass matlabshared.libiio.base" + }, + { + "prop_name": "SamplesPerFrame", + "prop_title": " Frame size", + "prop_description": "Size of the frame in samplesHelp for BufferADI/SamplesPerFrame is inherited from superclass matlabshared.libiio.base" + }, + { + "prop_name": "devName", + "prop_title": " Device name", + "prop_description": "Name of the libIIO deviceHelp for BufferADI/devName is inherited from superclass matlabshared.libiio.base" + }, + { + "prop_name": "kernelBuffersCount", + "prop_title": " Kernel buffers count", + "prop_description": "The number of buffers allocated in the kernel for data transfersHelp for BufferADI/kernelBuffersCount is inherited from superclass matlabshared.libiio.base" + }, + { + "prop_name": "dataTypeStr", + "prop_title": " Data type for the output data", + "prop_description": "A String Representing the data typeHelp for BufferADI/dataTypeStr is inherited from superclass matlabshared.libiio.base" + }, + { + "prop_name": "channelCount", + "prop_title": " Number of channels", + "prop_description": "Number of enabled channelsHelp for BufferADI/channelCount is inherited from superclass matlabshared.libiio.base" + }, + { + "prop_name": "DataTimeout", + "prop_title": " Timeout for I/O", + "prop_description": "Timeout for I/O operations (in seconds) 0 = non-blocking (or default context timeout) Inf = infiniteHelp for BufferADI/DataTimeout is inherited from superclass matlabshared.libiio.base" + } + ] + }, + { + "name": "Channel", + "dec": " Documentation for Channel
helpwin Channel
", + "props": [ + { + "prop_name": "uri", + "prop_title": " URI - remote host URI", + "prop_description": "Hostname or IP address of remote libIIO deviceHelp for Channel/uri is inherited from superclass matlabshared.libiio.base" + }, + { + "prop_name": "SamplesPerFrame", + "prop_title": " Frame size", + "prop_description": "Size of the frame in samplesHelp for Channel/SamplesPerFrame is inherited from superclass matlabshared.libiio.base" + }, + { + "prop_name": "devName", + "prop_title": " Device name", + "prop_description": "Name of the libIIO deviceHelp for Channel/devName is inherited from superclass matlabshared.libiio.base" + }, + { + "prop_name": "kernelBuffersCount", + "prop_title": " Kernel buffers count", + "prop_description": "The number of buffers allocated in the kernel for data transfersHelp for Channel/kernelBuffersCount is inherited from superclass matlabshared.libiio.base" + }, + { + "prop_name": "dataTypeStr", + "prop_title": " Data type for the output data", + "prop_description": "A String Representing the data typeHelp for Channel/dataTypeStr is inherited from superclass matlabshared.libiio.base" + }, + { + "prop_name": "channelCount", + "prop_title": " Number of channels", + "prop_description": "Number of enabled channelsHelp for Channel/channelCount is inherited from superclass matlabshared.libiio.base" + }, + { + "prop_name": "DataTimeout", + "prop_title": " Timeout for I/O", + "prop_description": "Timeout for I/O operations (in seconds) 0 = non-blocking (or default context timeout) Inf = infiniteHelp for Channel/DataTimeout is inherited from superclass matlabshared.libiio.base" + } + ] + }, + { + "name": "DDS", + "dec": " Documentation for DDS
doc DDS
DDS Blockset Documentation
doc DDS
", + "props": [ + { + "prop_name": "DataSource", + "prop_title": " DataSource Data Source", + "prop_description": "Data source, specified as one of the following: 'DMA' — Specify the host as the source of the data. 'DDS' — Specify the DDS on the radio hardware as the source of the data. In this case, each channel has two additive tones." + }, + { + "prop_name": "DDSFrequencies", + "prop_title": " DDSFrequencies DDS Frequencies", + "prop_description": "Frequencies values in Hz of the DDS tone generators. For complex data devices the input is a [2xN] matrix where N is the available channels on the board. For complex data devices this is at most max(EnabledChannels)*2. For non-complex data devices this is at most max(EnabledChannels). If N < this upper limit, other DDSs are not set." + }, + { + "prop_name": "DDSScales", + "prop_title": " DDSScales DDS Scales", + "prop_description": "Scale of DDS tones in range [0,1]. For complex data devices the input is a [2xN] matrix where N is the available channels on the board. For complex data devices this is at most max(EnabledChannels)*2. For non-complex data devices this is at most max(EnabledChannels). If N < this upper limit, other DDSs are not set." + }, + { + "prop_name": "DDSPhases", + "prop_title": " DDSPhases DDS Phases", + "prop_description": "Phases of DDS tones in range [0,360000]. For complex data devices the input is a [2xN] matrix where N is the available channels on the board. For complex data devices this is at most max(EnabledChannels)*2. For non-complex data devices this is at most max(EnabledChannels). If N < this upper limit, other DDSs are not set." + }, + { + "prop_name": "EnableCyclicBuffers", + "prop_title": " EnableCyclicBuffers Enable Cyclic Buffers", + "prop_description": "Enable Cyclic Buffers, configures transmit buffers to be cyclic, which makes them continuously repeat" + }, + { + "prop_name": "EnabledChannels", + "prop_title": "DDS/EnabledChannels is a property.", + "prop_description": "" + }, + { + "prop_name": "uri", + "prop_title": " URI - remote host URI", + "prop_description": "Hostname or IP address of remote libIIO deviceHelp for DDS/uri is inherited from superclass matlabshared.libiio.base" + }, + { + "prop_name": "SamplesPerFrame", + "prop_title": " Frame size", + "prop_description": "Size of the frame in samplesHelp for DDS/SamplesPerFrame is inherited from superclass matlabshared.libiio.base" + }, + { + "prop_name": "devName", + "prop_title": " Device name", + "prop_description": "Name of the libIIO deviceHelp for DDS/devName is inherited from superclass matlabshared.libiio.base" + }, + { + "prop_name": "kernelBuffersCount", + "prop_title": " Kernel buffers count", + "prop_description": "The number of buffers allocated in the kernel for data transfersHelp for DDS/kernelBuffersCount is inherited from superclass matlabshared.libiio.base" + }, + { + "prop_name": "dataTypeStr", + "prop_title": " Data type for the output data", + "prop_description": "A String Representing the data typeHelp for DDS/dataTypeStr is inherited from superclass matlabshared.libiio.base" + }, + { + "prop_name": "channelCount", + "prop_title": " Number of channels", + "prop_description": "Number of enabled channelsHelp for DDS/channelCount is inherited from superclass matlabshared.libiio.base" + }, + { + "prop_name": "DataTimeout", + "prop_title": " Timeout for I/O", + "prop_description": "Timeout for I/O operations (in seconds) 0 = non-blocking (or default context timeout) Inf = infiniteHelp for DDS/DataTimeout is inherited from superclass matlabshared.libiio.base" + } + ] + }, + { + "name": "DebugAttribute", + "dec": " obj = DebugAttribute
Documentation for DebugAttribute
doc DebugAttribute
", + "props": [ + { + "prop_name": "uri", + "prop_title": " URI - remote host URI", + "prop_description": "Hostname or IP address of remote libIIO deviceHelp for DebugAttribute/uri is inherited from superclass matlabshared.libiio.base" + }, + { + "prop_name": "SamplesPerFrame", + "prop_title": " Frame size", + "prop_description": "Size of the frame in samplesHelp for DebugAttribute/SamplesPerFrame is inherited from superclass matlabshared.libiio.base" + }, + { + "prop_name": "devName", + "prop_title": " Device name", + "prop_description": "Name of the libIIO deviceHelp for DebugAttribute/devName is inherited from superclass matlabshared.libiio.base" + }, + { + "prop_name": "kernelBuffersCount", + "prop_title": " Kernel buffers count", + "prop_description": "The number of buffers allocated in the kernel for data transfersHelp for DebugAttribute/kernelBuffersCount is inherited from superclass matlabshared.libiio.base" + }, + { + "prop_name": "dataTypeStr", + "prop_title": " Data type for the output data", + "prop_description": "A String Representing the data typeHelp for DebugAttribute/dataTypeStr is inherited from superclass matlabshared.libiio.base" + }, + { + "prop_name": "channelCount", + "prop_title": " Number of channels", + "prop_description": "Number of enabled channelsHelp for DebugAttribute/channelCount is inherited from superclass matlabshared.libiio.base" + }, + { + "prop_name": "DataTimeout", + "prop_title": " Timeout for I/O", + "prop_description": "Timeout for I/O operations (in seconds) 0 = non-blocking (or default context timeout) Inf = infiniteHelp for DebugAttribute/DataTimeout is inherited from superclass matlabshared.libiio.base" + } + ] + }, + { + "name": "DeviceAttribute", + "dec": " Documentation for DeviceAttribute
doc DeviceAttribute
", + "props": [ + { + "prop_name": "uri", + "prop_title": " URI - remote host URI", + "prop_description": "Hostname or IP address of remote libIIO deviceHelp for DeviceAttribute/uri is inherited from superclass matlabshared.libiio.base" + }, + { + "prop_name": "SamplesPerFrame", + "prop_title": " Frame size", + "prop_description": "Size of the frame in samplesHelp for DeviceAttribute/SamplesPerFrame is inherited from superclass matlabshared.libiio.base" + }, + { + "prop_name": "devName", + "prop_title": " Device name", + "prop_description": "Name of the libIIO deviceHelp for DeviceAttribute/devName is inherited from superclass matlabshared.libiio.base" + }, + { + "prop_name": "kernelBuffersCount", + "prop_title": " Kernel buffers count", + "prop_description": "The number of buffers allocated in the kernel for data transfersHelp for DeviceAttribute/kernelBuffersCount is inherited from superclass matlabshared.libiio.base" + }, + { + "prop_name": "dataTypeStr", + "prop_title": " Data type for the output data", + "prop_description": "A String Representing the data typeHelp for DeviceAttribute/dataTypeStr is inherited from superclass matlabshared.libiio.base" + }, + { + "prop_name": "channelCount", + "prop_title": " Number of channels", + "prop_description": "Number of enabled channelsHelp for DeviceAttribute/channelCount is inherited from superclass matlabshared.libiio.base" + }, + { + "prop_name": "DataTimeout", + "prop_title": " Timeout for I/O", + "prop_description": "Timeout for I/O operations (in seconds) 0 = non-blocking (or default context timeout) Inf = infiniteHelp for DeviceAttribute/DataTimeout is inherited from superclass matlabshared.libiio.base" + } + ] + }, + { + "name": "RegisterReadWrite", + "dec": " obj = RegisterReadWrite
Documentation for RegisterReadWrite
doc RegisterReadWrite
", + "props": [ + { + "prop_name": "uri", + "prop_title": " URI - remote host URI", + "prop_description": "Hostname or IP address of remote libIIO deviceHelp for RegisterReadWrite/uri is inherited from superclass matlabshared.libiio.base" + }, + { + "prop_name": "SamplesPerFrame", + "prop_title": " Frame size", + "prop_description": "Size of the frame in samplesHelp for RegisterReadWrite/SamplesPerFrame is inherited from superclass matlabshared.libiio.base" + }, + { + "prop_name": "devName", + "prop_title": " Device name", + "prop_description": "Name of the libIIO deviceHelp for RegisterReadWrite/devName is inherited from superclass matlabshared.libiio.base" + }, + { + "prop_name": "kernelBuffersCount", + "prop_title": " Kernel buffers count", + "prop_description": "The number of buffers allocated in the kernel for data transfersHelp for RegisterReadWrite/kernelBuffersCount is inherited from superclass matlabshared.libiio.base" + }, + { + "prop_name": "dataTypeStr", + "prop_title": " Data type for the output data", + "prop_description": "A String Representing the data typeHelp for RegisterReadWrite/dataTypeStr is inherited from superclass matlabshared.libiio.base" + }, + { + "prop_name": "channelCount", + "prop_title": " Number of channels", + "prop_description": "Number of enabled channelsHelp for RegisterReadWrite/channelCount is inherited from superclass matlabshared.libiio.base" + }, + { + "prop_name": "DataTimeout", + "prop_title": " Timeout for I/O", + "prop_description": "Timeout for I/O operations (in seconds) 0 = non-blocking (or default context timeout) Inf = infiniteHelp for RegisterReadWrite/DataTimeout is inherited from superclass matlabshared.libiio.base" + } + ] + }, + { + "name": "Rx", + "dec": " Documentation for Rx
doc Rx
", + "props": [ + { + "prop_name": "EnabledChannels", + "prop_title": " EnabledChannels Enabled Channels", + "prop_description": "Indexs of channels to be enabled. Input should be a [1xN] vector with the indexes of channels to be enabled. Order is irrelevant" + }, + { + "prop_name": "uri", + "prop_title": " URI - remote host URI", + "prop_description": "Hostname or IP address of remote libIIO deviceHelp for Rx/uri is inherited from superclass matlabshared.libiio.base" + }, + { + "prop_name": "SamplesPerFrame", + "prop_title": " Frame size", + "prop_description": "Size of the frame in samplesHelp for Rx/SamplesPerFrame is inherited from superclass matlabshared.libiio.base" + }, + { + "prop_name": "devName", + "prop_title": " Device name", + "prop_description": "Name of the libIIO deviceHelp for Rx/devName is inherited from superclass matlabshared.libiio.base" + }, + { + "prop_name": "kernelBuffersCount", + "prop_title": " Kernel buffers count", + "prop_description": "The number of buffers allocated in the kernel for data transfersHelp for Rx/kernelBuffersCount is inherited from superclass matlabshared.libiio.base" + }, + { + "prop_name": "dataTypeStr", + "prop_title": " Data type for the output data", + "prop_description": "A String Representing the data typeHelp for Rx/dataTypeStr is inherited from superclass matlabshared.libiio.base" + } + ] + }, + { + "name": "RxTx", + "dec": " obj = RxTx
Documentation for RxTx
doc RxTx
", + "props": [ + { + "prop_name": "EnabledChannels", + "prop_title": " EnabledChannels Enabled Channels", + "prop_description": "Indexs of channels to be enabled. Input should be a [1xN] vector with the indexes of channels to be enabled. Order is irrelevant" + }, + { + "prop_name": "uri", + "prop_title": " URI - remote host URI", + "prop_description": "Hostname or IP address of remote libIIO deviceHelp for RxTx/uri is inherited from superclass matlabshared.libiio.base" + }, + { + "prop_name": "SamplesPerFrame", + "prop_title": " Frame size", + "prop_description": "Size of the frame in samplesHelp for RxTx/SamplesPerFrame is inherited from superclass matlabshared.libiio.base" + }, + { + "prop_name": "devName", + "prop_title": " Device name", + "prop_description": "Name of the libIIO deviceHelp for RxTx/devName is inherited from superclass matlabshared.libiio.base" + }, + { + "prop_name": "kernelBuffersCount", + "prop_title": " Kernel buffers count", + "prop_description": "The number of buffers allocated in the kernel for data transfersHelp for RxTx/kernelBuffersCount is inherited from superclass matlabshared.libiio.base" + }, + { + "prop_name": "dataTypeStr", + "prop_title": " Data type for the output data", + "prop_description": "A String Representing the data typeHelp for RxTx/dataTypeStr is inherited from superclass matlabshared.libiio.base" + } + ] + }, + { + "name": "Sensor", + "dec": " Documentation for Sensor
helpwin Sensor
", + "props": [ + { + "prop_name": "ReadMode", + "prop_title": " ReadMode Read Mode", + "prop_description": "Specify whether to return the latest or the oldest data samples. The number of samples depends on the SamplesPerRead value. The data read from the sensor is stored in the MATLAB buffer." + }, + { + "prop_name": "OutputFormat", + "prop_title": " Set the output format of the data returned by executing the read", + "prop_description": "function. When the OutputFormat is set to timetable, the data returned has the following fields (if supported by device): Time — Time stamps in datetime or duration format Acceleration — N-by-3 array in units of m/s^2 AngularVelocity — N-by-3 array in units of rad/s MagneticField — N-by-3 array in units of µT (microtesla) When the OutputFormat is set to matrix, the data is returned as matrices of acceleration, angular velocity, magnetic field, and time stamps. The units for the sensor readings are the same as the timetable format. The size of each matrix is N-by-3. N is the number of samples per read specified by SamplesPerRead. The three columns of each field represent the measurements in x, y, and z axes." + }, + { + "prop_name": "SamplesPerRead", + "prop_title": " SamplesPerRead Samples Per Read", + "prop_description": "Number of samples per read, specified as a positive integer." + }, + { + "prop_name": "EnabledChannels", + "prop_title": " EnabledChannels Enabled Channels", + "prop_description": "Indexs of channels to be enabled. Input should be a [1xN] vector with the indexes of channels to be enabled. Order is irrelevant" + }, + { + "prop_name": "uri", + "prop_title": " URI - remote host URI", + "prop_description": "Hostname or IP address of remote libIIO deviceHelp for Sensor/uri is inherited from superclass matlabshared.libiio.base" + }, + { + "prop_name": "devName", + "prop_title": " Device name", + "prop_description": "Name of the libIIO deviceHelp for Sensor/devName is inherited from superclass matlabshared.libiio.base" + }, + { + "prop_name": "kernelBuffersCount", + "prop_title": " Kernel buffers count", + "prop_description": "The number of buffers allocated in the kernel for data transfersHelp for Sensor/kernelBuffersCount is inherited from superclass matlabshared.libiio.base" + }, + { + "prop_name": "dataTypeStr", + "prop_title": " Data type for the output data", + "prop_description": "A String Representing the data typeHelp for Sensor/dataTypeStr is inherited from superclass matlabshared.libiio.base" + } + ] + } +] \ No newline at end of file diff --git a/CI/doc/make.bat b/CI/doc/make.bat new file mode 100644 index 0000000..6247f7e --- /dev/null +++ b/CI/doc/make.bat @@ -0,0 +1,35 @@ +@ECHO OFF + +pushd %~dp0 + +REM Command file for Sphinx documentation + +if "%SPHINXBUILD%" == "" ( + set SPHINXBUILD=sphinx-build +) +set SOURCEDIR=source +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.http://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 diff --git a/CI/doc/requirements_doc.txt b/CI/doc/requirements_doc.txt new file mode 100644 index 0000000..411fbf9 --- /dev/null +++ b/CI/doc/requirements_doc.txt @@ -0,0 +1,10 @@ +sphinx>=2.0 +myst-parser +furo +sphinx-favicon +sphinxcontrib-mermaid +sphinx-simplepdf +pillow +numpy +jinja2 +sphinx_design \ No newline at end of file diff --git a/CI/doc/source/_static/assets/ADI_Logo_AWP_Large.png b/CI/doc/source/_static/assets/ADI_Logo_AWP_Large.png new file mode 100644 index 0000000..7a11a0c Binary files /dev/null and b/CI/doc/source/_static/assets/ADI_Logo_AWP_Large.png differ diff --git a/CI/doc/source/_static/assets/MATLAB_libiio_Stack.png b/CI/doc/source/_static/assets/MATLAB_libiio_Stack.png new file mode 100644 index 0000000..1788194 Binary files /dev/null and b/CI/doc/source/_static/assets/MATLAB_libiio_Stack.png differ diff --git a/CI/doc/source/_static/assets/add_ex.png b/CI/doc/source/_static/assets/add_ex.png new file mode 100644 index 0000000..6a3fa66 Binary files /dev/null and b/CI/doc/source/_static/assets/add_ex.png differ diff --git a/CI/doc/source/_static/assets/addons_page.png b/CI/doc/source/_static/assets/addons_page.png new file mode 100644 index 0000000..8059a08 Binary files /dev/null and b/CI/doc/source/_static/assets/addons_page.png differ diff --git a/CI/doc/source/_static/assets/addons_page_wbox.png b/CI/doc/source/_static/assets/addons_page_wbox.png new file mode 100644 index 0000000..8809e04 Binary files /dev/null and b/CI/doc/source/_static/assets/addons_page_wbox.png differ diff --git a/CI/doc/source/_static/assets/matlab_white_icon.svg b/CI/doc/source/_static/assets/matlab_white_icon.svg new file mode 100644 index 0000000..6f133d4 --- /dev/null +++ b/CI/doc/source/_static/assets/matlab_white_icon.svg @@ -0,0 +1,16 @@ + + + + + + + + + diff --git a/CI/doc/source/_static/assets/reference_design_with_IP.png b/CI/doc/source/_static/assets/reference_design_with_IP.png new file mode 100644 index 0000000..7a42ba4 Binary files /dev/null and b/CI/doc/source/_static/assets/reference_design_with_IP.png differ diff --git a/CI/doc/source/_static/css/style.css b/CI/doc/source/_static/css/style.css new file mode 100644 index 0000000..6116014 --- /dev/null +++ b/CI/doc/source/_static/css/style.css @@ -0,0 +1,95 @@ +:root { + /* Defaults */ + --display-dark-stuff: none; + --display-light-stuff: block; + --sidebar-highligh-color-hover: black; + --sidebar-highligh-color: white; + --display-dark-stuff: none; + --display-light-stuff: block; +} + +@media (prefers-color-scheme: dark) { + :root { + /* Change to dark if user prefers dark */ + --display-dark-stuff: block; + --display-light-stuff: none; + --sidebar-highligh-color-hover: white; + --sidebar-highligh-color: black; + --display-dark-stuff: block; + --display-light-stuff: none; + } +} + + +[data-theme=light] { + --sidebar-highligh-color-hover: black; + --sidebar-highligh-color: white; + --display-dark-stuff: none; + --display-light-stuff: block; +} + +[data-theme=dark] { + --sidebar-highligh-color-hover: white; + --sidebar-highligh-color: black; + --display-dark-stuff: block; + --display-light-stuff: none; +} + +/* Pad sidebar entries so radius does not touch content or browser*/ +body>div>aside>div>div>div.sidebar-scroll>div>ul { + padding-right: 10px; + padding-left: 10px; +} + +/* Disable sidebar title */ +.sidebar-brand-text { + display: none; +} + +/* Add better highlighting on selected sidebar entry */ +.sidebar-tree .current>.reference { + border-radius: 25px; + color: var(--sidebar-highligh-color); + padding-bottom: 5px; + padding-top: 5px; +} + +/* Add better highlighting on selected second level sidebar entry */ +.toctree-l2 .current.reference.internal { + border-radius: 25px; + color: var(--sidebar-highligh-color); + padding-bottom: 1px; + padding-top: 1px; + margin: 2px; +} + +/* Add better highlighting on selected hovered sidebar entry */ +.sidebar-tree .current>.reference:hover { + color: var(--sidebar-highligh-color-hover); + border: 1px solid var(--sidebar-highligh-color-hover); + padding-bottom: 4px; + padding-top: 4px; +} + +/* Add better highlighting on selected second level hovered sidebar entry */ +.toctree-l2 .current.reference.internal:hover { + color: var(--sidebar-highligh-color-hover); + border: 1px solid var(--sidebar-highligh-color-hover); + padding-bottom: 1px; + padding-top: 1px; + margin: 2px; +} + + +/* Hide/display logo on index page based on theme */ +#indexlogo_light { + display: var(--display-dark-stuff); +} + +#indexlogo_dark { + display: var(--display-light-stuff); +} + +element.style { + display: none; +} diff --git a/CI/doc/source/_static/favicon.png b/CI/doc/source/_static/favicon.png new file mode 100644 index 0000000..e18d7b0 Binary files /dev/null and b/CI/doc/source/_static/favicon.png differ diff --git a/CI/doc/source/conf.py b/CI/doc/source/conf.py new file mode 100644 index 0000000..a80f05a --- /dev/null +++ b/CI/doc/source/conf.py @@ -0,0 +1,146 @@ +# 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 -------------------------------------------------------------- + +# If extensions (or modules to document with autodoc) are in another directory, +# add these directories to sys.path here. If the directory is relative to the +# documentation root, use os.path.abspath to make it absolute, like shown here. +# +import contextlib +import os +import shutil +import sys +from typing import List + +sys.path.insert(0, os.path.abspath("../..")) +sys.setrecursionlimit(1500) + +# Move logos over to doc directory +p = os.path.join("_static", "logos") +if not os.path.exists(p): + os.mkdir("_static/logos") + +for filename in os.listdir(os.path.join("..", "..", "..", "logos")): + if filename.endswith(".png"): + shutil.copy( + os.path.join("..", "..", "..", "logos", filename), + os.path.join("_static", "logos", filename), + ) + fn = os.path.join("_static", "logos", filename) + from PIL import Image + + im = Image.open(fn) + # Remove left 30% of image + #im = im.crop((int(im.size[0] * 0.45), 0, int(im.size[0] * 1), im.size[1])) + im = im.crop((int(im.size[0] * 0.32), 0, int(im.size[0] * 1), im.size[1])) + im.save(fn.replace(".png", "_cropped.png")) + + +# -- Project information ----------------------------------------------------- + +project = "Analog Devices, Inc. ToolboxCommon" +copyright = "2019-2024, Analog Devices, Inc" +author = "Analog Devices, Inc." + +# The full version, including alpha/beta/rc tags +release = "v23.2.1" + + +# -- General configuration --------------------------------------------------- + +# The master toctree document. +master_doc = "index" + +# Add any Sphinx extension module names here, as strings. They can be +# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom +# ones. +extensions = [ + # "sphinx.ext.autodoc", + "sphinx.ext.coverage", + "sphinx.ext.githubpages", + "myst_parser", + "sphinx_favicon", + "sphinxcontrib.mermaid", + # "sphinx_copybutton", + # "sphinx_togglebutton", # Using this? + "sphinx_design", +] + +myst_enable_extensions = [ + "colon_fence", +] + +# Add any paths that contain templates here, relative to this directory. +templates_path = ["_templates"] + +# 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: List[str] = [] + +# Configuration of sphinx.ext.coverage +#coverage_show_missing_items = True + +# -- 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 = "furo" + +html_title = f"{project} {release}" +#favicons = ["favicon.png"] + +# 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 = ["_static"] + +html_css_files = [ + "css/style.css", +] + +html_theme_options = { + "light_logo": os.path.join("logos", "logo_black_cropped.png"), + "dark_logo": os.path.join("logos", "logo_white_cropped.png"), + "dark_css_variables": { + "color-sidebar-item-background--current": "white", + "color-sidebar-link-text": "white", + "color-sidebar-link-text--top-level": "white", + }, + "light_css_variables": { + "color-sidebar-item-background--current": "black", + "color-sidebar-link-text": "black", + "color-sidebar-link-text--top-level": "black", + }, +} + +if os.getenv("DEV_BUILD"): + branch = os.getenv("GIT_BRANCH") + if branch is None: + with contextlib.suppress(Exception): + # Try to get branch from git + import subprocess + + branch = ( + subprocess.run( + args=["git", "rev-parse", "--abbrev-ref", "HEAD"], + capture_output=True, + ) + .stdout.decode("utf-8") + .strip() + ) + if branch is None: + branch = "_UNKNOWN_" # type: ignore + html_theme_options["announcement"] = ( + "WARNING: This is a development \ + build of branch: " + + branch + + ". Please use the latest stable release." + ) + html_theme_options["dark_css_variables"]["color-announcement-text"] = "red" + html_theme_options["light_css_variables"]["color-announcement-text"] = "red" diff --git a/CI/doc/source/index.md b/CI/doc/source/index.md new file mode 100644 index 0000000..4198b9d --- /dev/null +++ b/CI/doc/source/index.md @@ -0,0 +1,58 @@ + + + +
+
+
+
+PyADI-IIO Logo +
+
+PyADI-IIO Logo +
+
+
+ + + + +ADI maintains a set of tools to model, interface, and target with ADI transceiver devices within MATLAB and Simulink. These are combined into single Toolbox which contains a set of Board Support Packages (BSP). The list of supported boards is provided below. + +The following have device-specific implementations in MATLAB and Simulink. If a device has an IIO driver, MATLAB support is possible, but a device-specific MATLAB or Simulink interface may not exist yet. + + +| Evaluation Card | FPGA Board | Streaming Support | Targeting | Variants and Minimum Supported Release | +| --------- | --------- | --------- | --------- | --------- | +| Pluto | | Yes | Yes | ADI (2018b) MathWorks (2017a) | +| FMComms2/3/4 | Zedboard | Yes | Yes | ADI (2018b) MathWorks (2014b) | +| | ZC702 | Yes | Yes | ADI (2018b) MathWorks (2014b) | +| | ZC706 | Yes | Yes | ADI (2018b) MathWorks (2014b) | +| | ZCU102 | Yes | Yes | ADI (2018b) MathWorks (2014b) | +| ARRADIO | Arrow SoCKit | Yes | No | ADI (2018b) | +| ADRV9361-Z7035 | | Yes | Yes | ADI (2018b) MathWorks (2015b) | +| ADRV9364-Z7020 | | Yes | Yes | ADI (2018b) | +| ADRV9371/5 | ZC706 | Yes | Yes | ADI (2018b) | +| | ZCU102 | Yes | Yes | ADI (2018b) | +| | ZYNQ3 | Yes | No | ADI (2018b) | +| ADRV9002 | ZCU102 | Yes | Yes | ADI (2020a) | +| ADRV9009/8 | ZC706 | Yes | No | ADI (2018b) | +| | ZCU102 | Yes | Yes | ADI (2018b) | +| ADRV9009-ZU11EG | | Yes | No | ADI (2020a) | + + + +## Sections + +```{eval-rst} +.. toctree:: + :maxdepth: 1 + + _generated/objects.md + +``` + diff --git a/logos/logo_black.png b/logos/logo_black.png new file mode 100644 index 0000000..7be4e68 Binary files /dev/null and b/logos/logo_black.png differ diff --git a/logos/logo_black.svg b/logos/logo_black.svg new file mode 100644 index 0000000..a9902e6 --- /dev/null +++ b/logos/logo_black.svg @@ -0,0 +1,268 @@ + + + + + + + + + + + + + + image/svg+xml + + + + + + + + ADI TOOLBOX-COMMON FOR MATLAB® & SIMULINK® + + + + + + + + + + + + + + + + + + + + + + + + + + + + + TOOLBOXCOMMON + + diff --git a/logos/logo_white.png b/logos/logo_white.png new file mode 100644 index 0000000..4570498 Binary files /dev/null and b/logos/logo_white.png differ diff --git a/logos/logo_white.svg b/logos/logo_white.svg new file mode 100644 index 0000000..3966852 --- /dev/null +++ b/logos/logo_white.svg @@ -0,0 +1,257 @@ + + + + + + + + + + + + image/svg+xml + + + + + + + + + ADI TOOLBOX-COMMON FOR MATLAB® & SIMULINK® + + + + + + + + + + + + + + + + + + + + + + + + + + + + + TOOLBOXCOMMON + +