Skip to content
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

rmt: Add user context pointer for use with RMT translator callbacks (IDFGH-4135) #6002

Closed

Conversation

outlandnish
Copy link
Contributor

Overview

This is a continuation of #5919
This PR allows adds a temporary function signature, rmt_init_translator_with_context so that users can pass in a context pointer to use with rmt_write_sample. This is useful for situations when you need a reference to the RMT channel being used in the translator function (or other context like timing data for the RMT pulses).

Example

An example of this usage is shown in https://github.com/intentfulmotion/AddressableLED/blob/master/src/OneWireLED.cpp. In this example, timing data for different addressable LED strips are passed to the translation function. Since this object is dynamically created and the timing is not known at compile time, this gives the developer flexibilty to write a single translator callback for different timing usecases.

@github-actions github-actions bot changed the title rmt: Add user context pointer for use with RMT translator callbacks rmt: Add user context pointer for use with RMT translator callbacks (IDFGH-4135) Oct 19, 2020
@Alvin1Zhang
Copy link
Collaborator

Thanks for your contribution.

@suda-morris
Copy link
Collaborator

Thanks @outlandnish this PR is in our internal review list now, will merge it as soon as possible 👍

@Alvin1Zhang
Copy link
Collaborator

Thanks for contribution, changes merged with 21bb6f2.

@Alvin1Zhang Alvin1Zhang closed this Feb 2, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants