docs/esp32: Add quickref and full docs for esp32.RMT class.

This commit is contained in:
Matt Trentini
2019-09-29 23:36:22 +10:00
committed by Damien George
parent 0e0e6132fd
commit 7f235cbee9
3 changed files with 102 additions and 0 deletions

View File

@@ -52,6 +52,7 @@ For your convenience, some of technical specifications are provided below:
* I2S: 2
* ADC: 12-bit SAR ADC up to 18 channels
* DAC: 2 8-bit DACs
* RMT: 8 channels allowing accurate pulse transmit/receive
* Programming: using BootROM bootloader from UART - due to external FlashROM
and always-available BootROM bootloader, the ESP32 is not brickable

View File

@@ -365,6 +365,20 @@ Notes:
p1 = Pin(4, Pin.OUT, None)
RMT
---
The RMT is ESP32-specific and allows generation of accurate digital pulses with
12.5ns resolution. See :ref:`esp32.RMT <esp32.RMT>` for details. Usage is::
import esp32
from machine import Pin
r = esp32.RMT(0, pin=Pin(18), clock_div=8)
r # RMT(channel=0, pin=18, source_freq=80000000, clock_div=8)
# The channel resolution is 100ns (1/(source_freq/clock_div)).
r.write_pulses((1, 20, 2, 40), start=0) # Send 0 for 100ns, 1 for 2000ns, 0 for 200ns, 1 for 4000ns
OneWire driver
--------------