Skip to content

Commit

Permalink
Apply changes from code review by @lucasssvaz
Browse files Browse the repository at this point in the history
Co-authored-by: Lucas Saavedra Vaz <lucassvaz@yahoo.com.br>
  • Loading branch information
P-R-O-C-H-Y and lucasssvaz committed Oct 3, 2023
1 parent b6368b4 commit 592d0bf
Show file tree
Hide file tree
Showing 3 changed files with 36 additions and 36 deletions.
4 changes: 2 additions & 2 deletions docs/source/api/ledc.rst
Original file line number Diff line number Diff line change
Expand Up @@ -130,8 +130,8 @@ This function is used to detach the pin from LEDC.
* ``pin`` select LEDC pin.

This function will return ``true`` if detaching is successful.
If ``false`` is returned, error occurs and pin is not detached.
This function returns ``true`` if detaching was successful.
If ``false`` is returned, an error occurred and the pin was not detached.

ledcChangeFrequency
*******************
Expand Down
18 changes: 9 additions & 9 deletions docs/source/api/sigmadelta.rst
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ Arduino-ESP32 SigmaDelta API
sigmaDeltaAttach
****************

This function is used to setup the SigmaDelta channel with selected frequency and attach it to selected pin.
This function is used to set up the SigmaDelta channel with the selected frequency and attach it to the selected pin.

.. code-block:: arduino
Expand All @@ -37,8 +37,8 @@ This function is used to setup the SigmaDelta channel with selected frequency an

* range is 1-14 bits (1-20 bits for ESP32).

This function will return ``true`` if configuration is successful.
If ``false`` is returned, error occurs and the SigmaDelta channel was not configured.
This function returns ``true`` if the configuration was successful.
If ``false`` is returned, an error occurred and the SigmaDelta channel was not configured.

sigmaDeltaWrite
***************
Expand All @@ -49,25 +49,25 @@ This function is used to set duty for the SigmaDelta pin.
bool sigmaDeltaWrite(uint8_t pin, uint8_t duty);
* ``pin`` select GPIO pin.
* ``duty`` select duty to be set for selected pin.
* ``pin`` selects the GPIO pin.
* ``duty`` selects the duty to be set for selected pin.

This function will return ``true`` if setting duty is successful.
This function returns ``true`` if setting the duty was successful.
If ``false`` is returned, error occurs and duty was not set.

sigmaDeltaDetach
****************

This function is used to detach pin from SigmaDelta and deinit the channel that was attached to the pin.
This function is used to detach a pin from SigmaDelta and deinit the channel that was attached to the pin.

.. code-block:: arduino
bool sigmaDeltaDetach(uint8_t pin);
* ``pin`` select GPIO pin.

This function will return ``true`` if detaching is successful.
If ``false`` is returned, error occurs and pin is not detached.
This function returns ``true`` if detaching was successful.
If ``false`` is returned, an error occurred and pin was not detached.

Example Applications
********************
Expand Down
50 changes: 25 additions & 25 deletions docs/source/migration_guide/2.x_to_3.0.rst
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ Migration from 2.x to 3.0
Introduction
------------

This is a guide to show breaking changes in API and to help migrate projects from 2.X version to 3.0 version of Arduino ESP32 core.
For more informations about all changes and new features check `RELESE NOTES <https://github.com/espressif/arduino-esp32/releases>`_.
This is a guide to highlight breaking changes in the API and to help the migration of projects from versions 2.X to version 3.0 of the Arduino ESP32 core.
For more information about the changes and new features, check `RELEASE NOTES <https://github.com/espressif/arduino-esp32/releases>`_.

ADC
---
Expand Down Expand Up @@ -40,14 +40,14 @@ Removed APIs
I2S
---

I2S driver has beed completely redesigned and refactored to use new ESP-IDF driver.
For more informations about the new API check `I2S API <https://docs.espressif.com/projects/arduino-esp32/en/latest/api/i2s.html>`_.
The I2S driver has been completely redesigned and refactored to use the new ESP-IDF driver.
For more information about the new API, check `I2S API <https://docs.espressif.com/projects/arduino-esp32/en/latest/api/i2s.html>`_.

LEDC
----

LEDC API has been changed in order to support the Peripheral Manager and easier use as LEDC channels are now automaticaly assigned to pins.
For more informations about the new API check `LEDC API <https://docs.espressif.com/projects/arduino-esp32/en/latest/api/ledc.html>`_.
The LEDC API has been changed in order to support the Peripheral Manager and make it easier to use, as LEDC channels are now automatically assigned to pins.
For more information about the new API, check `LEDC API <https://docs.espressif.com/projects/arduino-esp32/en/latest/api/ledc.html>`_.

Removed APIs
************
Expand All @@ -58,21 +58,21 @@ Removed APIs
New APIs
********

* ``ledcAttach`` used to setup LEDC pin (merged ``ledcSetup`` and ``ledcAttachPin`` functions).
* ``timerGetFrequency`` used to get actual frequency of the timer.
* ``timerAttachInterruptArg`` used to attach interrupt to timer using argument.
* ``ledcAttach`` used to set up the LEDC pin (merged ``ledcSetup`` and ``ledcAttachPin`` functions).
* ``timerGetFrequency`` used to get the actual frequency of the timer.
* ``timerAttachInterruptArg`` used to attach the interrupt to a timer using arguments.

Changes in APIs
***************

* ``ledcDetachPin`` renamed to ``ledcDetach``.
* In all functions input parameter ``channel`` have been changed to ``pin``.
* In all functions, input parameter ``channel`` has been changed to ``pin``.

RMT
---

TODO:
For more informations about the new API check `RMT API <https://docs.espressif.com/projects/arduino-esp32/en/latest/api/rmt.html>`_.
For more information about the new API, check `RMT API <https://docs.espressif.com/projects/arduino-esp32/en/latest/api/rmt.html>`_.

Removed APIs
************
Expand All @@ -92,8 +92,8 @@ TODO:
SigmaDelta
----------

SigmaDelta has been refactored to use new ESP-IDF driver.
For more informations about the new API check `SigmaDelta API <https://docs.espressif.com/projects/arduino-esp32/en/latest/api/sigmadelta.html>`_.
SigmaDelta has been refactored to use the new ESP-IDF driver.
For more information about the new API, check `SigmaDelta API <https://docs.espressif.com/projects/arduino-esp32/en/latest/api/sigmadelta.html>`_.

Removed APIs
************
Expand All @@ -104,20 +104,20 @@ Removed APIs
New APIs
********

* ``sigmaDeltaAttach`` used to setup SigmaDelta pin (channel is aquired automatically).
* ``timerGetFrequency`` used to get actual frequency of the timer.
* ``timerAttachInterruptArg`` used to attach interrupt to timer using argument.
* ``sigmaDeltaAttach`` used to set up the SigmaDelta pin (channel is acquired automatically).
* ``timerGetFrequency`` used to get the actual frequency of the timer.
* ``timerAttachInterruptArg`` used to attach the interrupt to a timer using arguments.

Changes in APIs
***************

* ``sigmaDeltaDetachPin`` renamed to ``sigmaDeltaDetach``.
* ``sigmaDeltaWrite`` input parameter ``channel`` have been changed to ``pin``.
* ``sigmaDeltaWrite`` input parameter ``channel`` has been changed to ``pin``.

Timer
-----

Timer has been refactored to use new ESP-IDF driver and its API got simplified. For more informations about the new API check
Timer has been refactored to use the new ESP-IDF driver and its API got simplified. For more information about the new API check
`TIMER API <https://docs.espressif.com/projects/arduino-esp32/en/latest/api/timer.html>`_.

Removed APIs
Expand All @@ -143,22 +143,22 @@ Removed APIs
New APIs
********

* ``timerAlarm`` used to setup Alarm for timer and enables it automaticaly (merged ``timerAlarmWrite`` and ``timerAlarmEnable`` functions).
* ``timerGetFrequency`` used to get actual frequency of the timer.
* ``timerAttachInterruptArg`` used to attach interrupt to timer using argument.
* ``timerAlarm`` used to set up Alarm for the timer and enable it automatically (merged ``timerAlarmWrite`` and ``timerAlarmEnable`` functions).
* ``timerGetFrequency`` used to get the actual frequency of the timer.
* ``timerAttachInterruptArg`` used to attach the interrupt to a timer using arguments.

Changes in APIs
***************

* ``timerBegin`` now have only 1 parameter wich is frequency. There is an automatic calculation of divider through different clock sources¨
to achieve selected frequency.
* ``timerAttachInterrupt`` now have only 2 parameters -> parameter ``edge`` has been removed.
* ``timerBegin`` has now only 1 parameter (frequency). There is an automatic calculation of the divider using different clock sources
to achieve the selected frequency.
* ``timerAttachInterrupt`` has now only 2 parameters. The ``edge`` parameter has been removed.

UART
----

TODO:
For more informations about the new API check `UART API <https://docs.espressif.com/projects/arduino-esp32/en/latest/api/rmt.html>`_.
For more information about the new API, check `UART API <https://docs.espressif.com/projects/arduino-esp32/en/latest/api/rmt.html>`_.

Removed APIs
************
Expand Down

0 comments on commit 592d0bf

Please sign in to comment.