Skip to content
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

docs(vale): Enable vale, fix errors and misspellings #10230

Closed
wants to merge 4 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
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
6 changes: 3 additions & 3 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
exclude: |
(?x)(
^\.github\/|
^tests\/performance\/coremark\/.*\.[ch]$
^tests\/performance\/coremark\/.*\.[ch]$|
^tests\/performance\/superpi\/.*\.(cpp|h)$|
LICENSE\.md$
)

default_language_version:
Expand Down Expand Up @@ -64,8 +66,6 @@ repos:
pass_filenames: false
args: [sync]
types_or: [markdown, rst]
stages: [manual]
- id: vale
language_version: "1.21.6"
types_or: [markdown, rst]
stages: [manual]
2 changes: 1 addition & 1 deletion .vale.ini
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ StylesPath = .vale/styles


# Specify the minimum alert severity that Vale will report.
MinAlertLevel = suggestion # "suggestion", "warning", or "error"
MinAlertLevel = error # "suggestion", "warning", or "error"


# Specify vocabulary for special treatment.
Expand Down
4 changes: 2 additions & 2 deletions cores/esp32/HWCDC.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -443,7 +443,7 @@ size_t HWCDC::write(const uint8_t *buffer, size_t size) {
if (connected) {
usb_serial_jtag_ll_ena_intr_mask(USB_SERIAL_JTAG_INTR_SERIAL_IN_EMPTY);
}
// tracks CDC trasmission progress to avoid hanging if CDC is unplugged while still sending data
// tracks CDC transmission progress to avoid hanging if CDC is unplugged while still sending data
size_t last_toSend = to_send;
uint32_t tries = tx_timeout_ms; // waits 1ms per sending data attempt, in case CDC is unplugged
while (connected && to_send) {
Expand Down Expand Up @@ -479,7 +479,7 @@ size_t HWCDC::write(const uint8_t *buffer, size_t size) {
}
}
}
// CDC was diconnected while sending data ==> flush the TX buffer keeping the last data
// CDC was disconnected while sending data ==> flush the TX buffer keeping the last data
if (to_send && !usb_serial_jtag_ll_txfifo_writable()) {
connected = false;
flushTXBuffer(buffer + so_far, to_send);
Expand Down
8 changes: 4 additions & 4 deletions docs/en/api/adc.rst
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ analogReadResolution
^^^^^^^^^^^^^^^^^^^^

This function is used to set the resolution of ``analogRead`` return value. Default is 12 bits (range from 0 to 4095)
for all chips except ESP32S3 where default is 13 bits (range from 0 to 8191).
for all chips except ESP32-S3 where default is 13 bits (range from 0 to 8191).
When different resolution is set, the values read will be shifted to match the given resolution.

Range is 1 - 16 .The default value will be used, if this function is not used.
Expand Down Expand Up @@ -146,7 +146,7 @@ analogSetWidth
.. note:: This function is only available for ESP32 chip.

This function is used to set the hardware sample bits and read resolution.
Default is 12bit (0 - 4095).
Default is 12 bits (0 - 4095).
Range is 9 - 12.

.. code-block:: arduino
Expand Down Expand Up @@ -250,13 +250,13 @@ This function is used to set the attenuation for ADC continuous peripheral. For

void analogContinuousSetAtten(adc_attenuation_t attenuation);

* ``attenuation`` sets the attenuation (default is 11db).
* ``attenuation`` sets the attenuation (default is 11 dB).

analogContinuousSetWidth
^^^^^^^^^^^^^^^^^^^^^^^^

This function is used to set the hardware resolution bits.
Default value for all chips is 12bit (0 - 4095).
Default value for all chips is 12 bits (0 - 4095).

.. note:: This function will take effect only for ESP32 chip, as it allows to set resolution in range 9-12 bits.

Expand Down
2 changes: 1 addition & 1 deletion docs/en/api/dac.rst
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ This function is used to set the DAC value for a given pin/DAC channel.
void dacWrite(uint8_t pin, uint8_t value);

* ``pin`` GPIO pin.
* ``value`` to be set. Range is 0 - 255 (equals 0V - 3.3V).
* ``value`` to be set. Range is 0 - 255 (equals 0 V - 3.3 V).

dacDisable
**********
Expand Down
10 changes: 5 additions & 5 deletions docs/en/api/espnow.rst
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ Create an instance of the `ESP_NOW_Peer` class.

* ``mac_addr``: MAC address of the peer device.
* ``channel``: Communication channel.
* ``iface``: WiFi interface.
* ``iface``: Wi-Fi interface.
* ``lmk``: Optional. Pass the local master key (LMK) if encryption is enabled.

add
Expand Down Expand Up @@ -190,24 +190,24 @@ Set the communication channel of the peer.
getInterface
^^^^^^^^^^^^

Get the WiFi interface of the peer.
Get the Wi-Fi interface of the peer.

.. code-block:: cpp

wifi_interface_t getInterface() const;

Returns the WiFi interface.
Returns the Wi-Fi interface.

setInterface
^^^^^^^^^^^^

Set the WiFi interface of the peer.
Set the Wi-Fi interface of the peer.

.. code-block:: cpp

void setInterface(wifi_interface_t iface);

* ``iface``: WiFi interface.
* ``iface``: Wi-Fi interface.

isEncrypted
^^^^^^^^^^^
Expand Down
2 changes: 1 addition & 1 deletion docs/en/api/i2c.rst
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ This function will return the current frequency configuration.
setTimeOut
^^^^^^^^^^

Set the bus timeout given in milliseconds. The default value is 50ms.
Set the bus timeout given in milliseconds. The default value is 50 ms.

.. code-block:: arduino

Expand Down
10 changes: 5 additions & 5 deletions docs/en/api/insights.rst
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ ESP Insights
About
-----

ESP Insights is a remote diagnostics solution that allows users to remotely monitor the health of ESP devices in the field.
ESP Insights is a remote diagnostics solution that allows users to remotely monitor the health of Espressif devices in the field.

Developers normally prefer debugging issues by physically probing them using gdb or observing the logs. This surely helps debug issues, but there are often cases wherein issues are seen only in specific environments under specific conditions. Even things like casings and placement of the product can affect the behavior. A few examples are

Expand Down Expand Up @@ -156,8 +156,8 @@ This function will return
Insights.metrics.dumpWiFi
*************************

Dumps the wifi metrics and prints them to the console.
This API can be used to collect wifi metrics at any given point in time.
Dumps the Wi-Fi metrics and prints them to the console.
This API can be used to collect Wi-Fi metrics at any given point in time.

.. code-block:: arduino

Expand Down Expand Up @@ -185,8 +185,8 @@ Insights.metrics.setWiFiPeriod
******************************

Reset the periodic interval
By default, wifi metrics are collected every 30 seconds, this function can be used to change the interval.
If the interval is set to 0, wifi metrics collection disabled.
By default, Wi-Fi metrics are collected every 30 seconds, this function can be used to change the interval.
If the interval is set to 0, Wi-Fi metrics collection disabled.

.. code-block:: arduino

Expand Down
4 changes: 2 additions & 2 deletions docs/en/api/rainmaker.rst
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ ESP RainMaker Agent API
RMaker.initNode
***************

This initializes the ESP RainMaker agent, wifi and creates the node.
This initializes the ESP RainMaker agent, Wi-Fi and creates the node.

You can also set the configuration of the node using the following API

Expand All @@ -54,7 +54,7 @@ It starts the ESP RainMaker agent.
**NOTE**:

1. ESP RainMaker agent should be initialized before this call.
2. Once ESP RainMaker agent starts, compulsorily call WiFi.beginProvision() API.
2. Once ESP RainMaker agent starts, compulsorily call ``WiFi.beginProvision()`` API.

.. code-block:: arduino

Expand Down
6 changes: 3 additions & 3 deletions docs/en/api/touch.rst
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ touchSetCycles
^^^^^^^^^^^^^^

This function is used to set cycles that measurement operation takes. The result from touchRead, threshold and detection accuracy depend on these values.
The defaults are setting touchRead to take ~0.5ms.
The defaults are setting touchRead to take ~0.5 ms.

.. code-block:: arduino

Expand Down Expand Up @@ -112,8 +112,8 @@ the threshold value. Default is lower.

void touchInterruptSetThresholdDirection(bool mustbeLower);

TOUCH API specific for ESP32S2 and ESP32S3 chip (TOUCH_V2)
**********************************************************
TOUCH API specific for ESP32-S2 and ESP32-S3 chip (TOUCH_V2)
************************************************************

touchInterruptGetLastStatus
^^^^^^^^^^^^^^^^^^^^^^^^^^^
Expand Down
2 changes: 1 addition & 1 deletion docs/en/api/usb.rst
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,7 @@ Get the USB power configuration.

uint16_t usbPower(void);

Return the current in mA. The default value is: ``0x500`` (500mA).
Return the current in mA. The default value is: ``0x500`` (500 mA).

usbClass
^^^^^^^^
Expand Down
16 changes: 8 additions & 8 deletions docs/en/api/wifi.rst
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ This is the mode to be used if you want to connect your project to the Internet.
API Description
---------------

Here is the description of the WiFi API.
Here is the description of the Wi-Fi API.

Common API
----------
Expand All @@ -53,7 +53,7 @@ Here are the common APIs that are used for both modes, AP and STA.
onEvent (and removeEvent)
*************************

Registers a caller-supplied function to be called when WiFi events
Registers a caller-supplied function to be called when Wi-Fi events
occur. Several forms are available.

Function pointer callback taking the event ID:
Expand Down Expand Up @@ -92,7 +92,7 @@ A similar set of functions are available to remove callbacks:

In all cases, the subscribing function accepts an optional event type to
invoke the callback only for that specific event; with the default
``ARDUINO_EVENT_MAX``, the callback will be invoked for all WiFi events.
``ARDUINO_EVENT_MAX``, the callback will be invoked for all Wi-Fi events.

Any callback function is given the event type in a parameter.
Some of the possible callback function formats also take an
Expand Down Expand Up @@ -141,9 +141,9 @@ may be retrieved:

.. warning::

The ``setHostname()`` function must be called BEFORE WiFi is started with
The ``setHostname()`` function must be called BEFORE Wi-Fi is started with
``WiFi.begin()``, ``WiFi.softAP()``, ``WiFi.mode()``, or ``WiFi.run()``.
To change the name, reset WiFi with ``WiFi.mode(WIFI_MODE_NULL)``,
To change the name, reset Wi-Fi with ``WiFi.mode(WIFI_MODE_NULL)``,
then proceed with ``WiFi.setHostname(...)`` and restart WiFi from scratch.

useStaticBuffers
Expand Down Expand Up @@ -619,7 +619,7 @@ WiFiScan

To perform the Wi-Fi scan for networks, you can use the following functions:

Start scan WiFi networks available.
Start scan Wi-Fi networks available.

.. code-block:: arduino

Expand All @@ -637,7 +637,7 @@ Delete last scan result from RAM.

void scanDelete();

Loads all infos from a scanned wifi in to the ptr parameters.
Loads all infos from a scanned Wi-Fi in to the ptr parameters.

.. code-block:: arduino

Expand All @@ -648,7 +648,7 @@ To see how to use the ``WiFiScan``, take a look at the ``WiFiScan.ino`` or ``WiF
Examples
--------

`Complete list of WiFi examples <https://github.com/espressif/arduino-esp32/tree/master/libraries/WiFi/examples>`_.
`Complete list of Wi-Fi examples <https://github.com/espressif/arduino-esp32/tree/master/libraries/WiFi/examples>`_.

.. _ap example:

Expand Down
11 changes: 8 additions & 3 deletions docs/en/boards/ESP32-C3-DevKitM-1.rst
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ The ESP32-C3-DevKitM-1 development board is one of Espressif's official boards.
Specifications
--------------

- Small­ sized 2.4 GHz Wi­Fi (802.11 b/g/n) and Bluetooth® 5 module
- Built around ESP32­C3 series of SoCs, RISC­V single­core microprocessor
- Small sized 2.4 GHz Wi-Fi (802.11b/g/n) and Bluetooth® 5 module
- Built around ESP32-C3 series of SoCs, RISC-V single-core microprocessor
- 4 MB flash in chip package
- 15 available GPIOs (module)
- Peripherals
Expand All @@ -30,7 +30,7 @@ Specifications
- 2 × 54-bit general-purpose timers
- 3 × watchdog timers
- 1 × 52-bit system timer
- On­board PCB antenna or external antenna connector
- Onboard PCB antenna or external antenna connector

Header Block
------------
Expand All @@ -40,6 +40,9 @@ Header Block

J1
^^^

.. vale off

=== ==== ========== ===================================
No. Name Type [1]_ Function
=== ==== ========== ===================================
Expand All @@ -60,6 +63,8 @@ No. Name Type [1]_ Function
15 GND G Ground
=== ==== ========== ===================================

.. vale on

J3
^^^
=== ==== ========== ====================================
Expand Down
11 changes: 8 additions & 3 deletions docs/en/boards/ESP32-DevKitC-1.rst
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ The `ESP32-DevKitC-1`_ development board is one of Espressif's official boards.
Specifications
--------------

- Wi-Fi 802.11 b/g/n (802.11n up to 150 Mbps)
- Wi-Fi 802.11b/g/n (802.11n up to 150 Mbps)
- Bluetooth v4.2 BR/EDR and BLE specification
- Built around ESP32 series of SoCs
- Integrated 4 MB SPI flash
Expand All @@ -28,7 +28,7 @@ Specifications
- ADC
- DAC
- Two-Wire Automotive Interface (TWAI®, compatible with ISO11898-1)
- On­board PCB antenna or external antenna connector
- Onboard PCB antenna or external antenna connector

Header Block
------------
Expand All @@ -38,6 +38,9 @@ Header Block

J1
^^^

.. vale off

=== ==== ===== ===================================
No. Name Type Function
=== ==== ===== ===================================
Expand All @@ -62,6 +65,8 @@ No. Name Type Function
19 5V0 P 5 V power supply
=== ==== ===== ===================================

.. vale on

J3
^^^
=== ==== ===== ====================================
Expand Down Expand Up @@ -110,7 +115,7 @@ Some of the GPIO's have important features during the booting process. Here is t
==== ========= ===================================================================== ============ ==============
GPIO Default Function Pull-up Pull-down
==== ========= ===================================================================== ============ ==============
IO12 Pull-down Voltage of Internal LDO (VDD_SDIO) 1V8 3V3
IO12 Pull-down Voltage of Internal LDO (VDD_SDIO) 1.8 V 3.3 V
IO0 Pull-up Booting Mode SPI Boot Download Boot
IO2 Pull-down Booting Mode Don't Care Download Boot
IO15 Pull-up Enabling/Disabling Log Print During Booting and Timing of SDIO Slave U0TXD Active U0TXD Silent
Expand Down
Loading
Loading