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

gpio_matrix_out is not defined #220

Open
cjheath opened this issue Mar 21, 2023 · 6 comments
Open

gpio_matrix_out is not defined #220

cjheath opened this issue Mar 21, 2023 · 6 comments

Comments

@cjheath
Copy link

cjheath commented Mar 21, 2023

gpio_matrix_out(config->gpio_num, ledc_periph_signal[LEDC_LOW_SPEED_MODE].sig_out0_idx + config->channel_idx, config->output_invert, 0);
}
else
{
// Configure GPIO for output
bckl_dev->index = config->gpio_num;
gpio_pad_select_gpio(config->gpio_num);
ESP_ERROR_CHECK(gpio_set_direction(config->gpio_num, GPIO_MODE_OUTPUT));
gpio_matrix_out(config->gpio_num, SIG_GPIO_OUT_IDX, config->output_invert, false);

The called function gpio_matrix_out does not seem to exist anywhere in this library, in LVGL, or in any version of ESP-IDF.

What is the intention of this code, and how does anyone manage to build this package without a definition of this function?
More importantly, can it be fixed please?

@e5h
Copy link

e5h commented Mar 22, 2023

I am having the same issue, I found some discussion here:

#168

#171

The fixes I attempted which got the file to compile:

  • replace gpio_pad_select_gpio() with gpio_pin_reset()
  • replace gpio_matrix_out() with esp_rom_gpio_connect_out_signal()
  • add #include "rom/gpio.h" to driver/gpio.h
  • manually find the #define SIG_GPIO_OUT_IDX and put it in the file (file for ESP32-C3)
  • change .bit_num to .duty_resolution in LCD_backlight_timer

The specific driver files also needed changes.

@cjheath
Copy link
Author

cjheath commented Mar 22, 2023

That's not going to work for me because neither ESP-IDF v4.4.4 nor the current trunk version contains any reference to esp_rom_gpio_connect_out_signal

What version of ESP-IDF are you using?

@e5h
Copy link

e5h commented Mar 22, 2023

I am using v5.0, there is a reference to it here, the include statement in my first comment worked for me on an esp32-c3

On a side note, it would have been nice if the devs put some warnings about incompatible versions. As it stands right now, this library seems partially incompatible with both v8 of LVGL and v5.0 of the ESP-IDF.

@cjheath
Copy link
Author

cjheath commented Mar 22, 2023

Oh, ok, I missed that - I was probably searching for any definition of gpio_matrix_out at the time. I didn't want to jump to v5 yet because I figured that 3rd party support for V4 would be more stable.

I think I'll be able to figure out something that works with v4. It was just not knowing the definition for gpio_matrix_out I didn't know if it might contain any subtleties that are necessary to this function.

@Pi-pythoner
Copy link

Could anybody share your codes after edited with the new GPIO?

@hiruna
Copy link

hiruna commented May 26, 2023

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

No branches or pull requests

4 participants