espressif/rmt: replace rmtchar with arch-specific lirc adapter#18654
espressif/rmt: replace rmtchar with arch-specific lirc adapter#18654acassis merged 4 commits intoapache:masterfrom
Conversation
|
@PiyushPatle26 I liked the idea, however ESP32 RMT is use not only for RC, it is used as signal "generator" to control WS8212 RGB LEDs for example. Similar how people use I2S to emulate other protocols. @fdcavalcanti @tmedicci @eren-terzioglu please take a look |
|
@xiaoxiang781216 who from Xiaomi could help him: "Irtest seems struck so need guidance on what must be changed to validate completely" ? |
acassis
left a comment
There was a problem hiding this comment.
@PiyushPatle26 nice work! Kudos!!!
You didn't submit a Documentation about this driver, so searching further I noticed we even don't have basic documentation about RC: https://nuttx.apache.org/docs/latest/components/drivers/character/rc.html#remote-control-devices
Could you please help us to improve it?
|
related issue: #15431 |
Thanks for submitting it, @PiyushPatle26 . We are testing on our internal CI. Please don't merge it yet. As Alan pointed, @PiyushPatle26 , the RMT driver is used to drive the WS2812 (on-board LED for some of the Espressif's boards). Did you test it? |
03469b0 to
a214d60
Compare
|
@xiaoxiang781216 have removed the files you asked for |
need fix: |
a214d60 to
e94f877
Compare
|
@xiaoxiang781216, I have made the changes you asked. |
linguini1
left a comment
There was a problem hiding this comment.
Please read the contributing guide and update the PR description to match the requirements :)
07a76b6 to
f9787c9
Compare
|
@linguini1 I have made all the changes according to contributing.md |
|
Please check CI errors |
So the snake and shift game still working? That is the most important thing to save! :-D |
I have to find the demo board but even if it doesn't; it would be somehow different, no worries. :) |
Replace the ESP-specific rmtchar upper-half with arch-local esp_lirc adapters for Xtensa and RISC-V. This moves the RMT upper-half out of drivers/rmt, registers LIRC devices from the ESP board bring-up paths, and removes the old common rmtchar driver and headers. Also update the ESP Kconfig and build wiring to build esp_lirc when ESP_RMT and DRIVERS_RC are enabled. Fixes discovered during hardware validation: - register TX as /dev/lirc1 so RX and TX do not collide - parse the RX worker thread argument from the correct argv slot - keep RX devices from advertising TX capability Signed-off-by: Piyush Patle <piyushpatle228@gmail.com>
411e3b0 to
3acd6c5
Compare
Hey @eren-terzioglu, i think CI errors should be fixed now |
|
Ideally you should have a way to test your changes in some capacity. Also, the CI is failing because of config files which aren't normalized. You can use tools/refresh.sh to normalize them :) |
3acd6c5 to
b3972b6
Compare
Sorry for not being able to test properly, Thanks for helping for CI, now i have normalized the configs |
I did not test for esp32, only made for esp32c6 and esp32s3 let me test and report back Update: Seems it is fine too, fyi |
|
Hi @PiyushPatle26, please fix |
b3972b6 to
c5abfb4
Compare
Add documentation for the RC/LIRC character driver subsystem covering device registration, the LIRC interface, and usage from user space. Remove placeholder empty files under drivers/rmt that were left over from the rmtchar era and are no longer referenced. Signed-off-by: Piyush Patle <piyushpatle228@gmail.com>
Done |
The common ESP board RMT bring-up files are built whenever ESP_RMT is enabled, but the esp_lirc declarations are only visible when DRIVERS_RC is enabled. Guard the esp_lirc header include and esp_lirc_rx_initialize() / esp_lirc_tx_initialize() calls with CONFIG_DRIVERS_RC so non-RC ESP configs continue to build while keeping the LIRC registration path for the rmt configs. Signed-off-by: Piyush Patle <piyushpatle228@gmail.com>
esp_ws2812.h exposes esp_ws2812_setup() with a struct rmt_dev_s * argument but did not include esp_rmt.h directly. After guarding the LIRC board registration path with CONFIG_DRIVERS_RC, non-RC ESP configs no longer pulled in the RMT type indirectly and CI started failing with an incomplete struct rmt_dev_s declaration. Include esp_rmt.h in the Xtensa and RISC-V ws2812 headers. Signed-off-by: Piyush Patle <piyushpatle228@gmail.com>
|
@linguini1 PTAL, he already fixed the Summary |
Add: - replace rmtchar with arch-specific lirc adapter apache#18654 Signed-off-by: simbit18 <simbit18@gmail.com>
Note: Please adhere to Contributing Guidelines.
Summary
Replace the ESP-specific rmtchar upper-half with arch-local esp_lirc adapters for Xtensa and RISC-V.
This moves the RMT upper-half out of drivers/rmt, registers LIRC
devices from the ESP board bring-up paths, and removes the old common
rmtchar driver and headers.
Also update the ESP Kconfig and build wiring to build esp_lirc when
ESP_RMT and DRIVERS_RC are enabled.
Impact
drivers/rmtinto arch-localesp_lirc, aligning with NuttX layering./dev/lircXTesting
Tested on: ESP32-DEVKITC (Chip v1.0)
booted with CONFIG_ESP32_IGNORE_CHIP_REVISION_CHECK=y for local validation only
/dev/lirc0/dev/lirc1/dev/leds0Fixes discovered during hardware validation:
Test logs:

Irtest seems struck so need guidance on what must be changed to validate completely