@@ -14,67 +14,61 @@ ESP32 SoC Number of SigmaDelta channels
14
14
========= =============================
15
15
ESP32 8
16
16
ESP32-S2 8
17
- ESP32-C3 4
18
17
ESP32-S3 8
18
+ ESP32-C3 4
19
+ ESP32-C6 4
20
+ ESP32-H2 4
19
21
========= =============================
20
22
21
23
Arduino-ESP32 SigmaDelta API
22
24
----------------------------
23
25
24
- sigmaDeltaSetup
25
- ***************
26
+ sigmaDeltaAttach
27
+ ****************
26
28
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 .
28
30
29
31
.. code-block :: arduino
30
32
31
- uint32_t sigmaDeltaSetup (uint8_t pin, uint8_t channel , uint32_t freq);
33
+ bool sigmaDeltaAttach (uint8_t pin, uint32_t freq);
32
34
33
35
* ``pin `` select GPIO pin.
34
- * ``channel `` select SigmaDelta channel.
35
36
* ``freq `` select frequency.
36
37
37
38
* range is 1-14 bits (1-20 bits for ESP32).
38
39
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.
41
42
42
43
sigmaDeltaWrite
43
44
***************
44
45
45
- This function is used to set duty for the SigmaDelta channel .
46
+ This function is used to set duty for the SigmaDelta pin .
46
47
47
48
.. code-block :: arduino
48
49
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);
58
51
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.
64
54
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.
66
57
67
- sigmaDeltaDetachPin
68
- *******************
58
+ sigmaDeltaDetach
59
+ ****************
69
60
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 .
71
62
72
63
.. code-block :: arduino
73
64
74
- void sigmaDeltaDetachPin (uint8_t pin);
65
+ bool sigmaDeltaDetach (uint8_t pin);
75
66
76
67
* ``pin `` select GPIO pin.
77
68
69
+ This function will return ``true `` if detaching is successful.
70
+ If ``false `` is returned, error occurs and pin is not detached.
71
+
78
72
Example Applications
79
73
********************
80
74
0 commit comments