Skip to content

[Docs] Added the guideline for documentation #6409

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 5 commits into from
Mar 18, 2022
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
[Docs] PR review and minor typos and grammar fixes
  • Loading branch information
pedrominatel committed Mar 17, 2022
commit 4034933d2387604ac1474d166bec5db3afe32c2b
30 changes: 16 additions & 14 deletions docs/source/guides/docs_contributing.rst
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ API

In this section, you will include all the documentation about drivers, libraries, and any other related to the core.

In this section we do not add general information. For more general information, we have sections for other related parts, like the FAQ, library builder, troubleshooting, etc.
In this section, we do not add general information. For more general information, we have sections for other related parts, like the FAQ, library builder, troubleshooting, etc.

Boards
******
Expand All @@ -126,7 +126,7 @@ Here is the place to add any special guide on the development boards, pin layout
Common
******

In this folder, you can add all common information used in several different places. This helps to maintain the documentation easily maintainable.
In this folder, you can add all common information used in several different places. This helps to make documentation easily maintainable.


Guides
Expand All @@ -137,7 +137,7 @@ This is the place to add the guides for common applications, IDEs configuration,
Tutorials
*********

If you want to add a specific tutorial related to the Arduino for ESP32, this is the place. The intention is not to create a blog or a demo area, but this can be used to add some complex description or to add some more information about APIs.
If you want to add a specific tutorial related to the Arduino core for ESP32, this is the place. The intention is not to create a blog or a demo area, but this can be used to add some complex description or to add some more information about APIs.

Images and Assets
*****************
Expand Down Expand Up @@ -170,10 +170,10 @@ In this section, you need to add a brief description of the API. If you are desc
API Functions
^^^^^^^^^^^^^

To add a new function description, you must have in mind that the users only have access to the public functions.
To add a new function description, you must know that the users only have access to the public functions.


Here is an example on how to add the function description from `I2C API <https://docs.espressif.com/projects/arduino-esp32/en/latest/api/i2c.html>`_:
Here is an example of how to add the function description from `I2C API <https://docs.espressif.com/projects/arduino-esp32/en/latest/api/i2c.html>`_:

.. code-block::

Expand Down Expand Up @@ -202,12 +202,12 @@ Here is an example on how to add the function description from `I2C API <https:/

Be sure to include a very comprehensive description, add all the parameters in and out, and describe the desired output.

If the function use a spacific structure, you can also describe the structure in the same function block or add a specific section if the structure is shared with other functions.
If the function uses a specific structure, you can also describe the structure in the same function block or add a specific section if the structure is shared with other functions.

Basic Usage
^^^^^^^^^^^

Some APIs are more complex to use or require more steps in order to configure or initialize. If the API is not straight forward in terms of usalibilty, plese consider adding a how to use section, describing all the steps to get the API configured.
Some APIs are more complex to use or require more steps in order to configure or initialize. If the API is not straightforward in terms of usability, please consider adding a how-to-use section describing all the steps to get the API configured.

Here is an example:

Expand All @@ -216,13 +216,13 @@ Here is an example:
Basic Usage
^^^^^^^^^^^

To start using I2C as slave mode on the Arduino, the first step is to include the ``Wire.h`` header to the scketch.
To start using I2C as slave mode on the Arduino, the first step is to include the ``Wire.h`` header to the sketch.

.. code-block:: arduino

#include "Wire.h"

Before calling ``begin`` we must create two callback functions to handle the communication with the master device.
Before calling ``begin``, you must create two callback functions to handle the communication with the master device.

.. code-block:: arduino

Expand All @@ -234,15 +234,15 @@ Here is an example:

Wire.onRequest(onRequest);

The ``onReceive`` will handle the request from the master device uppon a slave read request and the ``onRequest`` will handle the answer to the master.
The ``onReceive`` will handle the request from the ``master`` device upon a slave read request and the ``onRequest`` will handle the answer to the master.

Now, we can start the peripheral configuration by calling ``begin`` function with the device address.

.. code-block:: arduino

Wire.begin((uint8_t)I2C_DEV_ADDR);

By using ``begin`` without any arguments, all the settings will be done by using the default values. To set the values by your own, see the function description. This function is described here: `i2c begin`_
By using ``begin`` without any arguments, all the settings will be done by using the default values. To set the values on your own, see the function description. This function is described here: `i2c begin`_



Expand Down Expand Up @@ -284,15 +284,17 @@ To add a code block, you can use the following structure:
Links
*****

To include links to external content, you can use two ways. The first
To include links to external content, you can use two ways.

* First option:

.. code-block::

`Arduino Wire Library`_

_Arduino Wire Library: https://www.arduino.cc/en/reference/wire

or
* Second option:

.. code-block::

Expand All @@ -319,7 +321,7 @@ Be sure the file size does not exceed 600kB.
Support
*******

If you need support on the documentation, you can ask a question as a discussion `here <https://github.com/espressif/arduino-esp32/discussions>`_.
If you need support on the documentation, you can ask a question in the discussion `here <https://github.com/espressif/arduino-esp32/discussions>`_.

Additional Guidelines
---------------------
Expand Down