RFC: Add RMT RX module. - #18454
RFC: Add RMT RX module.#18454elvis-epx wants to merge 5 commits into
Conversation
078969b to
84d4181
Compare
There was a problem hiding this comment.
Thanks for submitting this PR, @elvis-epx. I think this will be a really useful feature to have in MicroPython.
I've left some comments, mostly minor style and nitpicky things. The main high-level question I have is about the software filtering features.
The other thing that would be great to have here would a test, in tests/ports/esp32. It would be new as we also don't have a test for RMT TX ( 😢 ) but you could use the same loopback wiring pattern from tests/target_wiring/esp32.py to connect two GPIOs and then measure output from one via RMTRX. Would you be up for implementing something like this?
|
Code size report: |
Signed-off-by: Elvis Pfutzenreuter <elvis.pfutzenreuter@gmail.com>
Small fixes and style changes in RMT RX documentation. Co-authored-by: Angus Gratton <gus@projectgus.com> Signed-off-by: Elvis Pfützenreuter <elvis.pfutzenreuter@gmail.com>
Align the code style to esp32_rmt.c. Signed-off-by: Elvis Pfutzenreuter <elvis.pfutzenreuter@gmail.com>
Add comment to clarify where the 15-bit value comes from. Signed-off-by: Elvis Pfutzenreuter <elvis.pfutzenreuter@gmail.com>
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #18454 +/- ##
==========================================
+ Coverage 98.38% 98.42% +0.04%
==========================================
Files 171 174 +3
Lines 22299 22333 +34
==========================================
+ Hits 21938 21982 +44
+ Misses 361 351 -10 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
352036a to
8537c3a
Compare
projectgus
left a comment
There was a problem hiding this comment.
Hi @elvis-epx,
I have one minor suggestion but the new test looks great, thank you! 😁
The only other request I have is to please name the new test esp32_rmt.py instead of check_rmt.py, that's the (rough) convention we use for the other tests.
Add simple end-to-end test for RMT RX, and TX. Signed-off-by: Elvis Pfutzenreuter <elvis.pfutzenreuter@gmail.com>
Backports micropython/micropython#18454 from MP 1.29 (or later)

Summary
This is a proposal to add RX support to esp32 RMT, that currently supports TX only.
Testing
Tested on ESP32, ESP32-S3, ESP32-C3 and ESP32-C6 boards.
Trade-offs and Alternatives
A different class esp32.RMTRX was introduced. I feel it does not have much in common with esp32.RMT, and using TX and RX at the same time over the same pin is not usual in RMT. But someone may disagree.