2016-11-05 12:19:31 -04:00
Template
========
.. note ::
*INSTRUCTIONS*
1. Use this file as a template to document API.
2. Change the file name to the name of the header file that represents documented API.
3. Include respective files with descriptions from the API folder using `` ..include:: ``
* README.rst
* example.rst
4. Optionally provide description right in this file.
5. Once done, remove all instructions like this one and any superfluous headers.
2016-10-26 15:08:36 -04:00
Overview
--------
2016-11-05 12:19:31 -04:00
.. note ::
2016-10-26 15:08:36 -04:00
2016-11-05 12:19:31 -04:00
*INSTRUCTIONS*
2016-10-27 15:22:35 -04:00
2016-11-05 12:19:31 -04:00
1. Provide overview where and how this API may be used.
2. Where applicable include code snippets to illustrate functionality of particular functions.
3. To distinguish between sections, use the following `heading levels <http://www.sphinx-doc.org/en/stable/rest.html#sections> `_ :
2016-10-27 15:22:35 -04:00
2016-11-05 12:19:31 -04:00
* `` # `` with overline, for parts
* `` * `` with overline, for chapters
* `` = `` , for sections
* `` - `` , for subsections
* `` ^ `` , for subsubsections
* `` " `` , for paragraphs
2016-10-26 15:08:36 -04:00
Application Example
-------------------
2016-11-05 12:19:31 -04:00
.. note ::
*INSTRUCTIONS*
2016-10-26 15:08:36 -04:00
2016-11-05 12:19:31 -04:00
1. Provide one or more practical examples to demonstrate functionality of this API.
2. Break down the code into parts and describe functionality of each part.
3. Provide screenshots if applicable.
2016-10-26 15:08:36 -04:00
2016-11-05 12:19:31 -04:00
API Reference
-------------
2016-10-26 15:08:36 -04:00
2016-11-05 12:19:31 -04:00
.. note ::
2016-10-26 15:08:36 -04:00
2016-11-05 12:19:31 -04:00
*INSTRUCTIONS*
2016-11-10 16:50:55 -05:00
1. Specify the names of header files used to generate this reference. Each name should be linked to the source on `espressif/esp-idf <https://github.com/espressif/esp-idf> `_ repository.
2. Provide list of API members divided into sections.
3. Use corresponding `` .. doxygen.. `` directives, so member documentation is auto updated.
2016-10-26 15:08:36 -04:00
2016-11-10 16:50:55 -05:00
* Data Structures -`` .. doxygenstruct:: `` together with `` :members: ``
2016-11-05 12:19:31 -04:00
* Macros - `` .. doxygendefine:: ``
* Type Definitions - `` .. doxygentypedef:: ``
* Enumerations - `` .. doxygenenum:: ``
* Functions - `` .. doxygenfunction:: ``
2016-10-26 15:08:36 -04:00
2016-11-05 12:19:31 -04:00
See `Breathe documentation <https://breathe.readthedocs.io/en/latest/directives.html> `_ for additional information.
2016-11-10 16:50:55 -05:00
4. Once done remove superfluous headers.
5. When changes are committed and documentation is build, check how this section rendered. :doc: `Correct annotations <../documenting-code>` in respective header files, if required.
Header Files
^^^^^^^^^^^^
* `path/header-file.h`
2016-10-26 15:08:36 -04:00
Data Structures
^^^^^^^^^^^^^^^
2016-11-10 16:50:55 -05:00
::
.. doxygenstruct :: name_of_structure
:members:
2016-10-26 15:08:36 -04:00
Macros
^^^^^^
2016-11-10 16:50:55 -05:00
::
.. doxygendefine :: name_of_macro
2016-10-26 15:08:36 -04:00
Type Definitions
^^^^^^^^^^^^^^^^
2016-11-10 16:50:55 -05:00
::
.. doxygentypedef :: name_of_type
2016-10-26 15:08:36 -04:00
Enumerations
^^^^^^^^^^^^
2016-11-10 16:50:55 -05:00
::
.. doxygenenum :: name_of_enumeration
2016-10-26 15:08:36 -04:00
Functions
^^^^^^^^^
2016-11-10 16:50:55 -05:00
::
.. doxygenfunction :: name_of_function