QUERY · ISSUE
RMT read pulses?
enhancementport-esp32
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
CANDIDATE · PULL REQUEST
ports/esp32/esp32_rmt.c: #7015 ISR-driven pulse generator in RMT
port-esp32
See: #7015
Design Motivation:
- store static pulse pattern inside RMT driver only once, as a "pulse vocabulary" of available stanzas
- keep playing "pulse words" from this RMT pulse store with different stanza size and frequency via ISR call back
Purpose: provide high performance ISR-driven pulse generator in RMT.
This adds 2 new functions to ports/esp32/esp32_rmt.c:
// RMT.store_pulses(self, item_list:list[int]) -> None
// RMT.issue_pulses(self, tx_ready_func:callable, item_index:int, item_count:int, clock_div:int) -> None
Use case and examples are discussed here:
https://github.com/micropython/micropython/issues/7015#issuecomment-933131381
https://github.com/micropython/micropython/issues/7015#issuecomment-1100161761