testing: irtest usage to test Espressif's RMT peripheral.#3461
testing: irtest usage to test Espressif's RMT peripheral.#3461cederom merged 4 commits intoapache:masterfrom
irtest usage to test Espressif's RMT peripheral.#3461Conversation
|
Thank you @tmedicci :-) Would it be possible to mark this change as breaking with a short note that We also need documentation update there are references to |
The upper-half RMT driver is no longer available on NuttX. Instead, Espressif's RMT peripheral was bound directly to the lirc driver. For testing purposes, use the `irtest` application. NuttX OS PR apache/nuttx#18654 removed the upper-half driver interface used by this application, so removing it does not break any existing feature on NuttX. Signed-off-by: Tiago Medicci <tiago.medicci@espressif.com>
This commit fixes issues regarding portability by using variables with fixed width (and their format macro constants). Signed-off-by: Tiago Medicci <tiago.medicci@espressif.com>
Long write_data commands can be truncated without any check due to the maximum size of CONFIG_SYSTEM_IRTEST_MAX_SIRDATA. This commit adds a check to avoid a silent fail. Signed-off-by: Tiago Medicci <tiago.medicci@espressif.com>
Let `irtest` command line size be equal to CONFIG_LINE_MAX so that bigger (or smaller) commands can be set. Signed-off-by: Tiago Medicci <tiago.medicci@espressif.com>
99c6687 to
9ed8bc0
Compare
|
Hi @cederom !
I updated PR's description (and the respective commit) with the following message: I also added the
I'll prepare a PR for updating on NuttX OS repo, thanks! |
|
@xiaoxiang781216 this irtest in C++ will require more memory (normally just enabling libcxx will consume more 100KB even with almost all features disabled: exceptions, RTTI, etc). So it will a show stopper for many small MCUs. Is it possible to convert it from C++ to C? I noticed the code is mostly simple C, except for some templates usage. |
|
Updated documentation PR at apache/nuttx#18788. |
+1 :-) This looks C :D |
Summary
system/irtest: Set
irtestcommand line size to CONFIG_LINE_MAXirtestcommand line size be equal to CONFIG_LINE_MAX so that bigger (or smaller) commands can be set.system/irtest: Avoids silently truncating long write_data commands
system/irtest: Fix issues regarding portability and buffer size
examples: Remove deprecated
rmtcharexample applicationirtestapplication. NuttX OS PR espressif/rmt: replace rmtchar with arch-specific lirc adapter nuttx#18654 removed the upper-half driver interface used by this application, so removing it does not break any existing feature on NuttX.Impact
Impact on user: Yes. Improve user's experience when trying
irqtesttesting application.Impact on build: No.
Impact on hardware: No.
Impact on documentation: No.
Impact on security: No.
Impact on compatibility: No.
Testing
Build the
rmtdefconfig of any Espressif SoC, interconnect output and input pins externally and runirqtest. For ESP32-C6-DevKitC-1 V1.2, for instance:Building
Running
Connect GPIO 8 (RMT output pin) to GPIO 2 (RMT input pin) externally and run
irqtest:Results
Read data equals written data. Loopback test succeeded!