RMT read pulses?
Description
The esp32.RMT has a method for sending pulses, but no method for reading them. I would like to know if there are plans to implement this functionality in the future?
Code Size
No response
Implementation
I hope the MicroPython maintainers or community will implement this feature
Code of Conduct
Yes, I agree
Change esp32.RMT.source_freq() to class method
To create a 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, i.e. we have a chicken and egg problem. So RMT.source_freq() should really be a class method, not an instance method and this PR changes that in the code and documentation. Of course this change is backwards compatible for existing code because you can still reference that function from an instance, or now also, from the class, i.e.
from esp32 import RMT
rmt = RMT(0, pin)
assert rmt.source_freq() == RMT.source_freq()