diff options
| author | Mark Blakeney <mark.blakeney@bullet-systems.net> | 2023-10-24 10:24:26 +1000 |
|---|---|---|
| committer | Damien George <damien@micropython.org> | 2023-11-09 13:51:47 +1100 |
| commit | fbb7c32040c407a60126a879dc2afe07a0ef6e5d (patch) | |
| tree | e97269dccb9c703a4c900730e8d5d22b0dccfe5f /docs/library/esp32.rst | |
| parent | f07f90f1abfd6784db9c47a5602fae319991f8e7 (diff) | |
esp32/esp32_rmt: Change RMT.source_freq() to class method.
To create an esp32.RMT() instance with an optimum (i.e. highest resolution)
clock_div is currently awkward because you need to know the source clock
frequency to calculate the best clock_div, but unfortunately that is only
currently available as an source_freq() method on the instance after you
have already created it. So RMT.source_freq() should really be a class
method, not an instance method. This change is backwards compatible for
existing code because you can still reference that function from an
instance, or now also, from the class.
Signed-off-by: Mark Blakeney <mark.blakeney@bullet-systems.net>
Diffstat (limited to 'docs/library/esp32.rst')
| -rw-r--r-- | docs/library/esp32.rst | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/docs/library/esp32.rst b/docs/library/esp32.rst index 7701f4353..796dbbbc5 100644 --- a/docs/library/esp32.rst +++ b/docs/library/esp32.rst @@ -226,7 +226,7 @@ For more details see Espressif's `ESP-IDF RMT documentation. ``100``) and the output level to apply the carrier to (a boolean as per *idle_level*). -.. method:: RMT.source_freq() +.. classmethod:: RMT.source_freq() Returns the source clock frequency. Currently the source clock is not configurable so this will always return 80MHz. |
