Skip to content

Commit 683fea1

Browse files
authored
docs(vale): Enable vale and fix errors (#10231)
* docs(vale): Enable vale and fix errors * Apply suggestions
1 parent e04f050 commit 683fea1

File tree

51 files changed

+163
-135
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

51 files changed

+163
-135
lines changed

.pre-commit-config.yaml

-2
Original file line numberDiff line numberDiff line change
@@ -65,8 +65,6 @@ repos:
6565
pass_filenames: false
6666
args: [sync]
6767
types_or: [markdown, rst]
68-
stages: [manual]
6968
- id: vale
7069
language_version: "1.21.6"
7170
types_or: [markdown, rst]
72-
stages: [manual]

.vale.ini

+1-1
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ StylesPath = .vale/styles
2323

2424

2525
# Specify the minimum alert severity that Vale will report.
26-
MinAlertLevel = suggestion # "suggestion", "warning", or "error"
26+
MinAlertLevel = error # "suggestion", "warning", or "error"
2727

2828

2929
# Specify vocabulary for special treatment.

docs/en/api/adc.rst

+4-4
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ analogReadResolution
5353
^^^^^^^^^^^^^^^^^^^^
5454

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

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

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

152152
.. code-block:: arduino
@@ -250,13 +250,13 @@ This function is used to set the attenuation for ADC continuous peripheral. For
250250
251251
void analogContinuousSetAtten(adc_attenuation_t attenuation);
252252
253-
* ``attenuation`` sets the attenuation (default is 11db).
253+
* ``attenuation`` sets the attenuation (default is 11 dB).
254254

255255
analogContinuousSetWidth
256256
^^^^^^^^^^^^^^^^^^^^^^^^
257257

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

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

docs/en/api/dac.rst

+1-1
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ This function is used to set the DAC value for a given pin/DAC channel.
3333
void dacWrite(uint8_t pin, uint8_t value);
3434
3535
* ``pin`` GPIO pin.
36-
* ``value`` to be set. Range is 0 - 255 (equals 0V - 3.3V).
36+
* ``value`` to be set. Range is 0 - 255 (equals 0 V - 3.3 V).
3737

3838
dacDisable
3939
**********

docs/en/api/espnow.rst

+5-5
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,7 @@ Create an instance of the `ESP_NOW_Peer` class.
104104
105105
* ``mac_addr``: MAC address of the peer device.
106106
* ``channel``: Communication channel.
107-
* ``iface``: WiFi interface.
107+
* ``iface``: Wi-Fi interface.
108108
* ``lmk``: Optional. Pass the local master key (LMK) if encryption is enabled.
109109

110110
add
@@ -190,24 +190,24 @@ Set the communication channel of the peer.
190190
getInterface
191191
^^^^^^^^^^^^
192192

193-
Get the WiFi interface of the peer.
193+
Get the Wi-Fi interface of the peer.
194194

195195
.. code-block:: cpp
196196
197197
wifi_interface_t getInterface() const;
198198
199-
Returns the WiFi interface.
199+
Returns the Wi-Fi interface.
200200

201201
setInterface
202202
^^^^^^^^^^^^
203203

204-
Set the WiFi interface of the peer.
204+
Set the Wi-Fi interface of the peer.
205205

206206
.. code-block:: cpp
207207
208208
void setInterface(wifi_interface_t iface);
209209
210-
* ``iface``: WiFi interface.
210+
* ``iface``: Wi-Fi interface.
211211

212212
isEncrypted
213213
^^^^^^^^^^^

docs/en/api/i2c.rst

+1-1
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,7 @@ This function will return the current frequency configuration.
103103
setTimeOut
104104
^^^^^^^^^^
105105

106-
Set the bus timeout given in milliseconds. The default value is 50ms.
106+
Set the bus timeout given in milliseconds. The default value is 50 ms.
107107

108108
.. code-block:: arduino
109109

docs/en/api/insights.rst

+5-5
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ ESP Insights
55
About
66
-----
77

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

1010
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
1111

@@ -156,8 +156,8 @@ This function will return
156156
Insights.metrics.dumpWiFi
157157
*************************
158158

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

162162
.. code-block:: arduino
163163
@@ -185,8 +185,8 @@ Insights.metrics.setWiFiPeriod
185185
******************************
186186

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

191191
.. code-block:: arduino
192192

docs/en/api/rainmaker.rst

+2-2
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ ESP RainMaker Agent API
2929
RMaker.initNode
3030
***************
3131

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

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

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

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

5959
.. code-block:: arduino
6060

docs/en/api/touch.rst

+3-3
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ touchSetCycles
3636
^^^^^^^^^^^^^^
3737

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

4141
.. code-block:: arduino
4242
@@ -112,8 +112,8 @@ the threshold value. Default is lower.
112112
113113
void touchInterruptSetThresholdDirection(bool mustbeLower);
114114
115-
TOUCH API specific for ESP32S2 and ESP32S3 chip (TOUCH_V2)
116-
**********************************************************
115+
TOUCH API specific for ESP32-S2 and ESP32-S3 chip (TOUCH_V2)
116+
************************************************************
117117

118118
touchInterruptGetLastStatus
119119
^^^^^^^^^^^^^^^^^^^^^^^^^^^

docs/en/api/usb.rst

+1-1
Original file line numberDiff line numberDiff line change
@@ -154,7 +154,7 @@ Get the USB power configuration.
154154
155155
uint16_t usbPower(void);
156156
157-
Return the current in mA. The default value is: ``0x500`` (500mA).
157+
Return the current in mA. The default value is: ``0x500`` (500 mA).
158158

159159
usbClass
160160
^^^^^^^^

docs/en/api/wifi.rst

+8-8
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ This is the mode to be used if you want to connect your project to the Internet.
4343
API Description
4444
---------------
4545

46-
Here is the description of the WiFi API.
46+
Here is the description of the Wi-Fi API.
4747

4848
Common API
4949
----------
@@ -53,7 +53,7 @@ Here are the common APIs that are used for both modes, AP and STA.
5353
onEvent (and removeEvent)
5454
*************************
5555

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

5959
Function pointer callback taking the event ID:
@@ -92,7 +92,7 @@ A similar set of functions are available to remove callbacks:
9292
9393
In all cases, the subscribing function accepts an optional event type to
9494
invoke the callback only for that specific event; with the default
95-
``ARDUINO_EVENT_MAX``, the callback will be invoked for all WiFi events.
95+
``ARDUINO_EVENT_MAX``, the callback will be invoked for all Wi-Fi events.
9696

9797
Any callback function is given the event type in a parameter.
9898
Some of the possible callback function formats also take an
@@ -141,9 +141,9 @@ may be retrieved:
141141
142142
.. warning::
143143

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

149149
useStaticBuffers
@@ -619,7 +619,7 @@ WiFiScan
619619

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

622-
Start scan WiFi networks available.
622+
Start scan Wi-Fi networks available.
623623

624624
.. code-block:: arduino
625625
@@ -637,7 +637,7 @@ Delete last scan result from RAM.
637637
638638
void scanDelete();
639639
640-
Loads all infos from a scanned wifi in to the ptr parameters.
640+
Loads all infos from a scanned Wi-Fi in to the ptr parameters.
641641

642642
.. code-block:: arduino
643643
@@ -648,7 +648,7 @@ To see how to use the ``WiFiScan``, take a look at the ``WiFiScan.ino`` or ``WiF
648648
Examples
649649
--------
650650

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

653653
.. _ap example:
654654

docs/en/boards/ESP32-C3-DevKitM-1.rst

+8-3
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,8 @@ The ESP32-C3-DevKitM-1 development board is one of Espressif's official boards.
77
Specifications
88
--------------
99

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

3535
Header Block
3636
------------
@@ -40,6 +40,9 @@ Header Block
4040

4141
J1
4242
^^^
43+
44+
.. vale off
45+
4346
=== ==== ========== ===================================
4447
No. Name Type [1]_ Function
4548
=== ==== ========== ===================================
@@ -60,6 +63,8 @@ No. Name Type [1]_ Function
6063
15 GND G Ground
6164
=== ==== ========== ===================================
6265

66+
.. vale on
67+
6368
J3
6469
^^^
6570
=== ==== ========== ====================================

docs/en/boards/ESP32-DevKitC-1.rst

+8-3
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ The `ESP32-DevKitC-1`_ development board is one of Espressif's official boards.
77
Specifications
88
--------------
99

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

3333
Header Block
3434
------------
@@ -38,6 +38,9 @@ Header Block
3838

3939
J1
4040
^^^
41+
42+
.. vale off
43+
4144
=== ==== ===== ===================================
4245
No. Name Type Function
4346
=== ==== ===== ===================================
@@ -62,6 +65,8 @@ No. Name Type Function
6265
19 5V0 P 5 V power supply
6366
=== ==== ===== ===================================
6467

68+
.. vale on
69+
6570
J3
6671
^^^
6772
=== ==== ===== ====================================
@@ -110,7 +115,7 @@ Some of the GPIO's have important features during the booting process. Here is t
110115
==== ========= ===================================================================== ============ ==============
111116
GPIO Default Function Pull-up Pull-down
112117
==== ========= ===================================================================== ============ ==============
113-
IO12 Pull-down Voltage of Internal LDO (VDD_SDIO) 1V8 3V3
118+
IO12 Pull-down Voltage of Internal LDO (VDD_SDIO) 1.8 V 3.3 V
114119
IO0 Pull-up Booting Mode SPI Boot Download Boot
115120
IO2 Pull-down Booting Mode Don't Care Download Boot
116121
IO15 Pull-up Enabling/Disabling Log Print During Booting and Timing of SDIO Slave U0TXD Active U0TXD Silent

docs/en/boards/ESP32-S2-Saola-1.rst

+8-3
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ The `ESP32-S2-Saola-1`_ development board is one of Espressif's official boards.
77
Specifications
88
--------------
99

10-
- Wi-Fi 802.11 b/g/n (802.11n up to 150 Mbps)
10+
- Wi-Fi 802.11b/g/n (802.11n up to 150 Mbps)
1111
- Built around ESP32-S2 series of SoCs Xtensa® single-core
1212
- Integrated 4 MB SPI flash
1313
- Integrated 2 MB PSRAM
@@ -28,7 +28,7 @@ Specifications
2828
- 1 × LCD interface (8-bit serial RGB/8080/6800), implemented using the hardware resources of SPI2
2929
- 1 × LCD interface (8/16/24-bit parallel), implemented using the hardware resources of I2S
3030
- 1 × TWAI® controller (compatible with ISO 11898-1)
31-
- On­board PCB antenna or external antenna connector
31+
- PCB antenna or external antenna connector
3232

3333
Header Block
3434
------------
@@ -38,6 +38,9 @@ Header Block
3838

3939
J2
4040
^^^
41+
42+
.. vale off
43+
4144
=== ==== ===== ===================================
4245
No. Name Type Function
4346
=== ==== ===== ===================================
@@ -64,6 +67,8 @@ No. Name Type Function
6467
21 GND G Ground
6568
=== ==== ===== ===================================
6669

70+
.. vale on
71+
6772
J3
6873
^^^
6974
=== ==== ===== ====================================
@@ -114,7 +119,7 @@ Some of the GPIO's have important features during the booting process. Here is t
114119
==== ========= ===================================================================== ============ ==============
115120
GPIO Default Function Pull-up Pull-down
116121
==== ========= ===================================================================== ============ ==============
117-
IO45 Pull-down Voltage of Internal LDO (VDD_SDIO) 1V8 3V3
122+
IO45 Pull-down Voltage of Internal LDO (VDD_SDIO) 1.8 V 3.3 V
118123
IO0 Pull-up Booting Mode SPI Boot Download Boot
119124
IO46 Pull-down Booting Mode Don't Care Download Boot
120125
IO46 Pull-up Enabling/Disabling Log Print During Booting and Timing of SDIO Slave U0TXD Active U0TXD Silent

0 commit comments

Comments
 (0)