Skip to content

Commit 0fc3602

Browse files
committed
docs(ledc): Add ledcAttachChannel to docs
1 parent 224dea9 commit 0fc3602

File tree

1 file changed

+20
-0
lines changed

1 file changed

+20
-0
lines changed

docs/source/api/ledc.rst

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@ ledcAttach
2727
**********
2828

2929
This function is used to setup LEDC pin with given frequency and resolution.
30+
LEDC channel will be selected automatically.
3031

3132
.. code-block:: arduino
3233
@@ -41,6 +42,25 @@ This function is used to setup LEDC pin with given frequency and resolution.
4142
This function will return ``true`` if configuration is successful.
4243
If ``false`` is returned, error occurs and LEDC channel was not configured.
4344

45+
ledcAttachChannel
46+
*****************
47+
48+
This function is used to setup LEDC pin with given frequency, resolution and channel.
49+
50+
.. code-block:: arduino
51+
52+
bool ledcAttachChannel(uint8_t pin, uint32_t freq, uint8_t resolution, uint8_t channel);
53+
54+
* ``pin`` select LEDC pin.
55+
* ``freq`` select frequency of pwm.
56+
* ``resolution`` select resolution for LEDC channel.
57+
* ``channel`` select LEDC channel.
58+
59+
* range is 1-14 bits (1-20 bits for ESP32).
60+
61+
This function will return ``true`` if configuration is successful.
62+
If ``false`` is returned, error occurs and LEDC channel was not configured.
63+
4464
ledcWrite
4565
*********
4666

0 commit comments

Comments
 (0)