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

I think Espressif changed ESP32 library, so we dosn't access GPIO port pins directly. #341

Open
GokhanAyberk opened this issue Jun 13, 2024 · 2 comments

Comments

@GokhanAyberk
Copy link

Rules

  1. Post your code
  2. Post a picture of the problem and describe what you expect to see
  3. Run the pattern test and post the result as gif/video (need to have a bit more than one full RED/YELLOW/WHITE cycle)
  4. State what version of PxMatrix you are running and what MicroController you use

Hi Dominic
I think my issue general
I am using latest version and ESP32 wroom-DA.
My sketch was working very good. But I had this error after esp32 board lib update now,
""
/home/gokhan/Arduino/libraries/PxMatrix_LED_MATRIX_library/PxMatrix.h:83:29: error: 'GPIO' was not declared in this scope
83 | #define GPIO_REG_SET(val) GPIO.out_w1ts = val
| ^~~~
/home/gokhan/Arduino/libraries/PxMatrix_LED_MATRIX_library/PxMatrix.h:408:5: note: in expansion of macro 'GPIO_REG_SET'
408 | GPIO_REG_SET(1 << _LATCH_PIN);
| ^~~~~~~~~~~~
""

I think Espressif changed ESP32 library, so we dosn't access GPIO port pins directly.

I tried to fix like;
#include "hal/gpio_ll.h" ;
#include <PxMatrix.h>

but it doesn't work. Any suggestion?
Thank you.

@GokhanAyberk
Copy link
Author

I solved my issue, The other change was in the timer object use

  1. I added (#include "hal/gpio_ll.h" ;) line for direct access to GPIO pins
  2. I chagged my timer usage.
    void display_update_enable(bool is_enable) {
    timer = timerBegin(1000000);
    timerAttachInterrupt(timer, &display_updater);
    timerAlarm(timer, 4000, true,0);
    timerStart(timer);
    }

@sseodate
Copy link

sseodate commented Dec 6, 2024

i change back FW ESP32 3.xx to 2.xx and all is ok.

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

2 participants