docs: Fix sphinx build and cleanup for new repo

This commit is contained in:
Szymon Janc
2018-05-18 14:37:50 +02:00
parent bd65300bb7
commit 7a7b9dc704
8 changed files with 2451 additions and 21 deletions
-1
View File
@@ -3,4 +3,3 @@ node_modules
_build _build
doxygen_* doxygen_*
*.pyc *.pyc
.doctrees
+6 -8
View File
@@ -1,7 +1,7 @@
Mynewt Documentation NimBLE Bluetooth Stack Documentation
#################### #################################
This folder holds the documentation for the core OS of the This folder holds the documentation for the NimBLE Bluetooth stack from the
`Apache Mynewt`_ project. It is built using `Sphinx`_. `Apache Mynewt`_ project. It is built using `Sphinx`_.
The source code also contains inline comments in `Doxygen`_ The source code also contains inline comments in `Doxygen`_
format to document the APIs. format to document the APIs.
@@ -18,18 +18,16 @@ See: https://github.com/apache/mynewt-documentation#writing-documentation
Previewing Changes Previewing Changes
========================== ==========================
In order to preview any changes you make you must first install a Sphinx/Breathe/Doxygen toolchain as In order to preview any changes you make you must first install a Sphinx
described at https://github.com/apache/mynewt-documentation#id3. Then: toolchain as described at https://github.com/apache/mynewt-documentation#id3.
Then:
.. code-block:: bash .. code-block:: bash
$ cd docs $ cd docs
$ make clean && make preview && (cd _build/html && python -m SimpleHTTPServer 8080) $ make clean && make preview && (cd _build/html && python -m SimpleHTTPServer 8080)
.. _Apache Mynewt: https://mynewt.apache.org/ .. _Apache Mynewt: https://mynewt.apache.org/
.. _mynewt documentation: https://github.com/apache/mynewt-documentation .. _mynewt documentation: https://github.com/apache/mynewt-documentation
.. _Sphinx: http://www.sphinx-doc.org/ .. _Sphinx: http://www.sphinx-doc.org/
.. _Doxygen: http://www.doxygen.org/ .. _Doxygen: http://www.doxygen.org/
.. _Breathe: http://breathe.readthedocs.io/en/latest/
+1 -1
View File
@@ -11,7 +11,7 @@ At a high level, the NimBLE stack is divided into two components:
This document is an API reference for the host component. If you are This document is an API reference for the host component. If you are
interested in the general structure of the NimBLE stack and its non-host interested in the general structure of the NimBLE stack and its non-host
components, you might want to read the :doc:`../ble_intro`. components, you might want to read the :doc:`../index`.
The host sits directly below the application, and it serves as the The host sits directly below the application, and it serves as the
interface to the application for all BLE operations. interface to the application for all BLE operations.
+3 -3
View File
@@ -3,7 +3,7 @@ Configure device address
A BLE device needs an address to do just about anything. For information A BLE device needs an address to do just about anything. For information
on the various types of Bluetooth addresses, see the `NimBLE Host on the various types of Bluetooth addresses, see the `NimBLE Host
Identity Reference :doc:`<../../../network/ble/ble_hs/ble_hs_id/ble_hs_id>`. Identity Reference :doc:`<../ble_hs/ble_hs_id/ble_hs_id>`.
There are several methods for assigning an address to a NimBLE device. There are several methods for assigning an address to a NimBLE device.
The available options are documented below: The available options are documented below:
@@ -52,9 +52,9 @@ Method 3: Configure a random address at runtime
Random addresses get configured through the NimBLE host. The following Random addresses get configured through the NimBLE host. The following
two functions are used in random address configuration: two functions are used in random address configuration:
- :doc:`ble_hs_id_gen_rnd <../../../network/ble/ble_hs/ble_hs_id/functions/ble_hs_id_gen_rnd>`: - :doc:`ble_hs_id_gen_rnd <../ble_hs/ble_hs_id/functions/ble_hs_id_gen_rnd>`:
Generates a new random address. Generates a new random address.
- :doc:`ble_hs_id_set_rnd <../../../network/ble/ble_hs/ble_hs_id/functions/ble_hs_id_set_rnd>`: - :doc:`ble_hs_id_set_rnd <../ble_hs/ble_hs_id/functions/ble_hs_id_set_rnd>`:
Sets the device's random address. Sets the device's random address.
For an example of how this is done, see the :doc:`<../../../os/tutorials/ibeacon>`. For an example of how this is done, see the :doc:`<../../../os/tutorials/ibeacon>`.
+1 -1
View File
@@ -38,7 +38,7 @@ form:
typedef void ble_hs_reset_fn(int reason); typedef void ble_hs_reset_fn(int reason);
The ``reason`` parameter is a :doc:`NimBLE host return The ``reason`` parameter is a :doc:`NimBLE host return
code <../../../network/ble/ble_hs/ble_hs_return_codes>`. code <../ble_hs/ble_hs_return_codes>`.
Example Example
~~~~~~~ ~~~~~~~
+6 -6
View File
@@ -47,8 +47,8 @@ source_suffix = '.rst'
master_doc = 'index' master_doc = 'index'
# General information about the project. # General information about the project.
project = u'Mynewt' project = u'NimBLE Bluetooth Stack'
copyright = u'Copyright © 2017 The Apache Software Foundation, Licensed under the Apache License, Version 2.0 Apache and the Apache feather logo are trademarks of The Apache Software Foundation.' copyright = u'Copyright © 2018 The Apache Software Foundation, Licensed under the Apache License, Version 2.0 Apache and the Apache feather logo are trademarks of The Apache Software Foundation.'
author = u'The Apache Software Foundation' author = u'The Apache Software Foundation'
# The version info for the project you're documenting, acts as replacement for # The version info for the project you're documenting, acts as replacement for
@@ -70,7 +70,7 @@ language = None
# List of patterns, relative to source directory, that match files and # List of patterns, relative to source directory, that match files and
# directories to ignore when looking for source files. # directories to ignore when looking for source files.
# This patterns also effect to html_static_path and html_extra_path # This patterns also effect to html_static_path and html_extra_path
exclude_patterns = ['_build', 'Thumbs.db', '.DS_Store', 'themes'] exclude_patterns = ['_build', 'README.rst', 'Thumbs.db', '.DS_Store']
# The name of the Pygments (syntax highlighting) style to use. # The name of the Pygments (syntax highlighting) style to use.
pygments_style = 'sphinx' pygments_style = 'sphinx'
@@ -109,7 +109,7 @@ html_theme_options = {
# Add any paths that contain custom static files (such as style sheets) here, # 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, # relative to this directory. They are copied after the builtin static files,
# so a file named "default.css" will overwrite the builtin "default.css". # so a file named "default.css" will overwrite the builtin "default.css".
html_static_path = ['_static'] html_static_path = []
# -- Options for HTMLHelp output ------------------------------------------ # -- Options for HTMLHelp output ------------------------------------------
@@ -142,7 +142,7 @@ latex_elements = {
# (source start file, target name, title, # (source start file, target name, title,
# author, documentclass [howto, manual, or own class]). # author, documentclass [howto, manual, or own class]).
latex_documents = [ latex_documents = [
(master_doc, 'Mynewt.tex', u'Mynewt Documentation', (master_doc, 'Mynewt.tex', u'NimBLE Bluetooth Stack',
u'The Apache Software Foundation', 'manual'), u'The Apache Software Foundation', 'manual'),
] ]
@@ -163,7 +163,7 @@ man_pages = [
# (source start file, target name, title, author, # (source start file, target name, title, author,
# dir menu entry, description, category) # dir menu entry, description, category)
texinfo_documents = [ texinfo_documents = [
(master_doc, 'Mynewt', u'Mynewt Documentation', (master_doc, 'Mynewt', u'NimBLE Bluetooth Stack',
author, 'Mynewt', 'One line description of project.', author, 'Mynewt', 'One line description of project.',
'Miscellaneous'), 'Miscellaneous'),
] ]
+2433
View File
File diff suppressed because it is too large Load Diff
+1 -1
View File
@@ -113,7 +113,7 @@ Mynewt comes with two built-in projects that allow users to play with
NimBLE, try the tutorials out with, and see how to use available NimBLE, try the tutorials out with, and see how to use available
services. services.
1. **bletiny** : A simple shell application which provides a basic 1. **btshell** : A simple shell application which provides a basic
interface to the host-side of the BLE stack. interface to the host-side of the BLE stack.
2. **bleprph**: A basic peripheral device with no user interface. It 2. **bleprph**: A basic peripheral device with no user interface. It
advertises automatically on startup, and resumes advertising whenever advertises automatically on startup, and resumes advertising whenever