Skip to content

Commit

Permalink
docs(ledc): Add ledcWriteChannel function and attach update
Browse files Browse the repository at this point in the history
  • Loading branch information
P-R-O-C-H-Y committed Jul 15, 2024
1 parent 19c6500 commit 3fc241d
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions docs/en/api/ledc.rst
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ ledcAttachChannel
*****************

This function is used to setup LEDC pin with given frequency, resolution and channel.
Attaching multiple pins to the same channel will make them share the same duty cycle. Given frequency, resolution will be ignored if channel is already configured.

.. code-block:: arduino
Expand Down Expand Up @@ -76,6 +77,21 @@ This function is used to set duty for the LEDC pin.
This function will return ``true`` if setting duty is successful.
If ``false`` is returned, error occurs and duty was not set.

ledcWriteChannel
****************

This function is used to set duty for the LEDC channel.

.. code-block:: arduino
bool ledcWriteChannel(uint8_t channel, uint32_t duty);
* ``channel`` select LEDC channel.
* ``duty`` select duty to be set for selected LEDC channel.

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

ledcRead
********

Expand Down

0 comments on commit 3fc241d

Please sign in to comment.