esp-idf-hal icon indicating copy to clipboard operation
esp-idf-hal copied to clipboard

RMT Support (RX)

Open Verequies opened this issue 3 years ago • 7 comments

I'm currently trying to replicate the ESP-IDF blink get started example for the ESP32-S3 and have run into a couple of roadblocks, specifically when trying to implement led_strip_rmt_ws2812.c.

There is no RMT support in esp-idf-hal, looking at other branches it appears it was once supported, but now removed. Is there a reason for this? Could it be added back in?

The other problem is that it appears the GPIO pin configuration does not match up with the ESP32-S3. You cannot select GPIO48 for example, which is required for the blink example where it uses the RGB LED onboard the ESP32-S3 Dev Kit.

Verequies avatar Nov 15 '21 00:11 Verequies

I think I'd like to take a swing at this. Just curious @ivmarkov, why was the previous implementation removed (if you remember)? Is it a viable reference, or was there some fundamental problem with it?

jessebraham avatar Dec 10 '21 03:12 jessebraham

I have never done such implementation myself.

Perhaps it was something from the old code written by @sapir which was not using typestates, which I might have removed once I introduced those. Difficult to say as I've hit the road and cannot inspect the history ATM.

ivmarkov avatar Dec 10 '21 10:12 ivmarkov

Here: https://github.com/esp-rs/esp-idf-hal/blob/v0.1.2/src/rmt.rs

ivmarkov avatar Dec 10 '21 11:12 ivmarkov

Probably needs to be updated to take the new style pins, and needs to use generics like everything else. Not sure if it can implement any embedded hal trait. Maybe this one: https://github.com/rust-embedded/embedded-hal/blob/master/src/pwm.rs

ivmarkov avatar Dec 10 '21 11:12 ivmarkov

Can I get some feedback/guidance on this WIP PR? https://github.com/esp-rs/esp-idf-hal/pull/44

I am not sure what is expected of me to implement, if I'm implementing things in line with the project's goals, etc? Basically I would like to know if I'm on the right track or not, and am happy to change it around if it's too high level or too complicated etc.

I am planning on implementing RX too, and I've tried to generally implement things in a similar way to the other modules in the project.

gak avatar Feb 06 '22 01:02 gak

The TX part of this has been implemented in #44. Should it stay open for the RX?

gak avatar Mar 02 '22 22:03 gak

We can keep this open for now I think, I've updated the issue title to better reflect what's left to do :)

MabezDev avatar Mar 03 '22 10:03 MabezDev

Now available in master.

ivmarkov avatar Nov 12 '22 14:11 ivmarkov

@Verequies would you mind linking your led_strip example? :) (in case its working and public)

edit nvm an example is already in this repo, sorry

HannesGitH avatar Nov 17 '22 09:11 HannesGitH