Skip to content

Commit f84db04

Browse files
committed
Update sigmadelta docs
1 parent 49528c8 commit f84db04

File tree

1 file changed

+22
-28
lines changed

1 file changed

+22
-28
lines changed

docs/source/api/sigmadelta.rst

Lines changed: 22 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -14,67 +14,61 @@ ESP32 SoC Number of SigmaDelta channels
1414
========= =============================
1515
ESP32 8
1616
ESP32-S2 8
17-
ESP32-C3 4
1817
ESP32-S3 8
18+
ESP32-C3 4
19+
ESP32-C6 4
20+
ESP32-H2 4
1921
========= =============================
2022

2123
Arduino-ESP32 SigmaDelta API
2224
----------------------------
2325

24-
sigmaDeltaSetup
25-
***************
26+
sigmaDeltaAttach
27+
****************
2628

27-
This function is used to setup the SigmaDelta channel frequency and resolution.
29+
This function is used to setup the SigmaDelta channel with selected frequency and attach it to selected pin.
2830

2931
.. code-block:: arduino
3032
31-
uint32_t sigmaDeltaSetup(uint8_t pin, uint8_t channel, uint32_t freq);
33+
bool sigmaDeltaAttach(uint8_t pin, uint32_t freq);
3234
3335
* ``pin`` select GPIO pin.
34-
* ``channel`` select SigmaDelta channel.
3536
* ``freq`` select frequency.
3637

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

39-
This function will return ``frequency`` configured for the SigmaDelta channel.
40-
If ``0`` is returned, error occurs and the SigmaDelta channel was not configured.
40+
This function will return ``true`` if configuration is successful.
41+
If ``false`` is returned, error occurs and the SigmaDelta channel was not configured.
4142

4243
sigmaDeltaWrite
4344
***************
4445

45-
This function is used to set duty for the SigmaDelta channel.
46+
This function is used to set duty for the SigmaDelta pin.
4647

4748
.. code-block:: arduino
4849
49-
void sigmaDeltaWrite(uint8_t channel, uint8_t duty);
50-
51-
* ``channel`` select SigmaDelta channel.
52-
* ``duty`` select duty to be set for selected channel.
53-
54-
sigmaDeltaRead
55-
**************
56-
57-
This function is used to get configured duty for the SigmaDelta channel.
50+
bool sigmaDeltaWrite(uint8_t pin, uint8_t duty);
5851
59-
.. code-block:: arduino
60-
61-
uint8_t sigmaDeltaRead(uint8_t channel)
62-
63-
* ``channnel`` select SigmaDelta channel.
52+
* ``pin`` select GPIO pin.
53+
* ``duty`` select duty to be set for selected pin.
6454

65-
This function will return ``duty`` configured for the selected SigmaDelta channel.
55+
This function will return ``true`` if setting duty is successful.
56+
If ``false`` is returned, error occurs and duty was not set.
6657

67-
sigmaDeltaDetachPin
68-
*******************
58+
sigmaDeltaDetach
59+
****************
6960

70-
This function is used to detach pin from SigmaDelta.
61+
This function is used to detach pin from SigmaDelta and deinit the channel that was attached to the pin.
7162

7263
.. code-block:: arduino
7364
74-
void sigmaDeltaDetachPin(uint8_t pin);
65+
bool sigmaDeltaDetach(uint8_t pin);
7566
7667
* ``pin`` select GPIO pin.
7768

69+
This function will return ``true`` if detaching is successful.
70+
If ``false`` is returned, error occurs and pin is not detached.
71+
7872
Example Applications
7973
********************
8074

0 commit comments

Comments
 (0)