Add arduino-esp32 3.x compatibility.

This commit is contained in:
Brad Nelson
2024-07-21 17:41:19 -07:00
parent c4f0895e54
commit de39be5392
5 changed files with 41 additions and 11 deletions

View File

@ -407,6 +407,20 @@ dacWrite ( pin 0-255 -- ) Write to DAC (pin 25, 26)
<h5>ledc</h5>
These words are inside the <code>ledc</code> vocabulary.
<pre>
<i>(arduino-esp32 3.x+)</i>
ledcAttach ( pin freq resolution -- f )
ledcAttachChannel ( pin freq resolution channel -- f )
ledcDetach ( pin -- f )
ledcRead ( channel -- n )
ledcReadFreq ( channel -- freq )
ledcWrite ( channel duty -- )
ledcWriteTone ( channel freq -- freq )
ledcWriteNote ( channel note octave -- freq )
ledcChangeFrequency ( pin freq resolution -- freq )
</pre>
If built with arduino-esp32 2.x, this is the interface:
<pre>
<i>(arduino-esp32 2.x+)</i>
ledcSetup ( channel freq resolution -- freq )
ledcAttachPin ( pin channel -- )
ledcDetachPin ( pin -- )