Skip to content

Commit 3fc241d

Browse files
committed
docs(ledc): Add ledcWriteChannel function and attach update
1 parent 19c6500 commit 3fc241d

File tree

1 file changed

+16
-0
lines changed

1 file changed

+16
-0
lines changed

docs/en/api/ledc.rst

+16
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,7 @@ ledcAttachChannel
4545
*****************
4646

4747
This function is used to setup LEDC pin with given frequency, resolution and channel.
48+
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.
4849

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

80+
ledcWriteChannel
81+
****************
82+
83+
This function is used to set duty for the LEDC channel.
84+
85+
.. code-block:: arduino
86+
87+
bool ledcWriteChannel(uint8_t channel, uint32_t duty);
88+
89+
* ``channel`` select LEDC channel.
90+
* ``duty`` select duty to be set for selected LEDC channel.
91+
92+
This function will return ``true`` if setting duty is successful.
93+
If ``false`` is returned, error occurs and duty was not set.
94+
7995
ledcRead
8096
********
8197

0 commit comments

Comments
 (0)