-
Notifications
You must be signed in to change notification settings - Fork 7.7k
feat(rmt): improves RMT documentation #11992
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Conversation
👋 Hello SuGlider, we appreciate your contribution to this project! 📘 Please review the project's Contributions Guide for key guidelines on code, documentation, testing, and more. 🖊️ Please also make sure you have read and signed the Contributor License Agreement for this project. Click to see more instructions ...
Review and merge process you can expect ...
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR adds comprehensive documentation for the RMT (Remote Control Transceiver) peripheral API in the Arduino-ESP32 framework. The documentation replaces a placeholder "work in progress" message with complete reference material covering all RMT functionality.
Key changes:
- Added detailed explanations of RMT peripheral capabilities and use cases (IR protocols, WS2812 LEDs, custom protocols)
- Documented all RMT API functions including initialization, transmission (blocking/async/looping), reception, and configuration
- Included memory block allocation details for different ESP32 SoC variants
- Added code examples and helper macro documentation
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| Constant defining the number of RMT symbols per memory block. | ||
|
|
||
| * ESP32/ESP32-S2: 64 symbols per block | ||
| * ESP32-S3/ESP32-C3/ESP32-C6/ESP32-H2: 48 symbols per block |
Copilot
AI
Nov 7, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Incomplete list of SoCs. Line 39 mentions that ESP32-C5 and ESP32-P4 have 48 symbols per block, but line 424 omits these two SoCs from the list. The complete list should be: "ESP32-S3/ESP32-C3/ESP32-C5/ESP32-C6/ESP32-H2/ESP32-P4: 48 symbols per block"
| * ESP32-S3/ESP32-C3/ESP32-C6/ESP32-H2: 48 symbols per block | |
| * ESP32-S3/ESP32-C3/ESP32-C5/ESP32-C6/ESP32-H2/ESP32-P4: 48 symbols per block |
|
|
||
| **Non-blocking mode:** Returns immediately after execution. Use ``rmtTransmitCompleted()`` to check if transmission is finished. | ||
|
|
||
| **Note:** If more than one ``rmtWriteAsync()`` is called in sequence, it will wait for the first transmission to finish, returning ``false`` to indicate failure. |
Copilot
AI
Nov 7, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Unclear error condition description. The note states "If more than one rmtWriteAsync() is called in sequence, it will wait for the first transmission to finish, returning false to indicate failure." This is contradictory - if it waits for the first transmission to finish, that's blocking behavior, which conflicts with the non-blocking nature described above. Please clarify whether subsequent calls fail immediately (returning false) or wait (making it blocking).
| **Note:** If more than one ``rmtWriteAsync()`` is called in sequence, it will wait for the first transmission to finish, returning ``false`` to indicate failure. | |
| **Note:** If ``rmtWriteAsync()`` is called while a previous transmission is still in progress, it will return ``false`` immediately to indicate failure; it does not wait for the previous transmission to finish. |
|
|
||
| **Note:** | ||
| * If ``rmtWrite()`` times out or ``rmtWriteAsync()`` is called, this function will return ``false`` until all data is sent out. | ||
| * ``rmtTransmitCompleted()`` will always return ``true`` when ``rmtWriteLooping()`` is active, because looping mode never completes. |
Copilot
AI
Nov 7, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Incorrect behavior description for looping mode. The note states that rmtTransmitCompleted() will always return true when rmtWriteLooping() is active. However, this contradicts the function's purpose - during looping mode, the transmission never completes (it loops infinitely), so rmtTransmitCompleted() should return false, not true. Please verify and correct this description.
| * ``rmtTransmitCompleted()`` will always return ``true`` when ``rmtWriteLooping()`` is active, because looping mode never completes. | |
| * ``rmtTransmitCompleted()`` will always return ``false`` when ``rmtWriteLooping()`` is active, because looping mode never completes. |
Description of Change
Improves the RMT documentation for the Arduino API
Test Scenarios
CI Only
Related links
N/A