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

Adds S3 GPIO48 in digitalPinToInterrupt() + GPIO INTR Review #8562

Closed
wants to merge 23 commits into from

Conversation

SuGlider
Copy link
Collaborator

Description of Change

A user has open an issue about not being able to add an Interrupt to ESP32-S3 GPIO 48 because the GPIO num shall be lower than 48 in digitalPinToInterrupt() macro.

Based on it, this PR has a initial review of the macros and the values used in pins_arduio.h for the main SoCs (ESP32, S2, S3 and C3).

Tests scenarios

Simples test done in ESP32/S2/S3/C3 with attachInterrupt().

Related links

Closes #8560

@SuGlider SuGlider added this to the 2.0.12 milestone Aug 25, 2023
@SuGlider SuGlider self-assigned this Aug 25, 2023
@SuGlider
Copy link
Collaborator Author

@me-no-dev - Please let me know if this change makes sense.
In case it makes sense, should I change all variants, before merging?

Copy link
Member

@P-R-O-C-H-Y P-R-O-C-H-Y left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good :)

Copy link
Collaborator

@lucasssvaz lucasssvaz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@VojtechBartoska VojtechBartoska added Status: Pending Merge Pull Request is ready to be merged Area: Peripherals API Relates to peripheral's APIs. labels Aug 28, 2023
@VojtechBartoska
Copy link
Contributor

Resolution:

  • we can add to all variants

@SuGlider
Copy link
Collaborator Author

SuGlider commented Sep 1, 2023

@lucasssvaz @P-R-O-C-H-Y @me-no-dev -- ready for reviewing....
This was a lot of work and time... :-(

@SuGlider
Copy link
Collaborator Author

SuGlider commented Sep 1, 2023

I also fixed a wrong already merged file name (pins_arduino.h.txt) :

12 changes: 6 additions & 6 deletions12
variants/lilygo_t_display/pins_arduino.h.txt → variants/lilygo_t_display/pins_arduino.h

@SuGlider
Copy link
Collaborator Author

SuGlider commented Sep 1, 2023

The changes in this PR also include all recently added new boards (last 4 days).
So this is the complete review of all different SoC boards, RGB LEDs etc.

I've researched a lot of boards to make sure the all RGB NeoPixel LEDs are correctly mapped into the pins_arduino.h for each board.

@SuGlider
Copy link
Collaborator Author

SuGlider commented Sep 1, 2023

But... there may be errors... so please take some time to review it carefully. Thanks!

@VojtechBartoska
Copy link
Contributor

Thanks @SuGlider for handling this! I can imagine it was time consuming.

@me-no-dev
Copy link
Member

I am not sure how to properly review this, but if you are worried that there might be issues, I would suggest we leave it for 3.0.0 and not risk another bugfix 2.0.x

@VojtechBartoska
Copy link
Contributor

What about modifying slightly https://github.com/espressif/arduino-esp32/actions/workflows/boards.yml and check this by that?

@P-R-O-C-H-Y
Copy link
Member

I am not sure how to properly review this, but if you are worried that there might be issues, I would suggest we leave it for 3.0.0 and not risk another bugfix 2.0.x

As @VojtechBartoska mentioned, we can at least run the allboards workflow to see if there are any issues. I will add to the workflow new trigger on some label, let's say "Boards test" and then we can run it. I am not sure if we are able to run it now on PR when the workflow is set to run only on remote dispatch.

What do you think @me-no-dev ? That test can at least cover some typos check as I already found one.

@me-no-dev
Copy link
Member

I am not sure if we are able to run it now on PR when the workflow is set to run only on remote dispatch.

You would need to specify the target pr when executing the workflow. Pass it as argument and then act in the workflow itself.

https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/reviewing-changes-in-pull-requests/checking-out-pull-requests-locally

@P-R-O-C-H-Y
Copy link
Member

P-R-O-C-H-Y commented Sep 1, 2023

@SuGlider @me-no-dev I see a lot of boards failing to compile the CI test sketch.
CI action on this PR => 33 boards failed
CI action on master for comparison => 4 boards failed (missing SS pin + some other issues)

@SuGlider
Copy link
Collaborator Author

SuGlider commented Sep 3, 2023

@P-R-O-C-H-Y @me-no-dev - This PR seems now ready and fine. It passes the Boards CI.
https://github.com/SuGlider/arduino-esp32/actions/runs/6067330536

@P-R-O-C-H-Y had some concerns about changing all the boards... we can discuss what would be best to do.
Anyway, if necessary, I can quickly create a new PR that addresses only the critical issue with the S3 GPIO48 and some other issues found in the CI process.

@VojtechBartoska VojtechBartoska modified the milestones: 2.0.12, 3.0.0 Sep 4, 2023
@VojtechBartoska
Copy link
Contributor

This PR with changes for all variants is left to 3.0.0 milestone as it can have more consequences.

@SuGlider will open new PR with GPIO pin change from 48 to 49 for 2.0.12 milestone.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area: Peripherals API Relates to peripheral's APIs.
Projects
Development

Successfully merging this pull request may close these issues.

digitalPinToInterrupt doesn't accept pin 48
5 participants