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

Fixed RMT initialization on GPIO0 #23

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -276,13 +276,13 @@ void ESP32RMTController::init()
// NOTE: In ESP-IDF 4.1++, there is a #define to init, but that doesn't exist
// in earlier versions
#if ESP_IDF_VERSION >= ESP_IDF_VERSION_VAL(4, 1, 0)
rmt_config_t rmt_tx = RMT_DEFAULT_CONFIG_TX(gpio_num_t(0), rmt_channel);
rmt_config_t rmt_tx = RMT_DEFAULT_CONFIG_TX(mPin, rmt_channel);
#else
rmt_config_t rmt_tx;
memset((void*) &rmt_tx, 0, sizeof(rmt_tx));
rmt_tx.channel = rmt_channel;
rmt_tx.rmt_mode = RMT_MODE_TX;
rmt_tx.gpio_num = gpio_num_t(0); // The particular pin will be assigned later
rmt_tx.gpio_num = mPin;
#endif

rmt_tx.mem_block_num = MEM_BLOCK_NUM;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -248,7 +248,7 @@ class ESP32RMTController

// -- Initialize RMT subsystem
// This only needs to be done once
static void init();
void init();

// -- Show this string of pixels
// This is the main entry point for the pixel controller
Expand Down