Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

fix(pins_arduino): Fixes te mask for the Watchy Device pins #11738

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

Merged
me-no-dev merged 4 commits into master from fix/watchy_pin_mask
Sep 4, 2025

Conversation

Copy link
Collaborator

@SuGlider SuGlider commented Aug 16, 2025
edited
Loading

Description of Change

Based on user report, the Watchy pins-arduino.h causes compilation error.
It shall follow https://github.com/sqfmi/Watchy/blob/master/src/config.h

Test Scenarios

Select Watchy board and try to compile a basic sketch
The board revision will default to "Watchy 2.0". Leave it that way.

Open Arduino IDE Examples -> Watchy -> WatchFaces -> Basic.ino

#include <Watchy.h>
#include "settings.h"
Watchy watchy(settings);
void setup() {
 watchy.init();
}
void loop() {}

Error Message that shall be fixed with this PR:

In file included from C:\Users\esp\AppData\Local\Arduino15\packages\esp32\hardware\esp323円.3.0\cores\esp32/Arduino.h:43,
 from C:\Users\esp\Documents\Arduino\libraries\Watchy\src\Watchy.h:4,
 from C:\Users\esp\Documents\Arduino\libraries\Watchy\src\Watchy.cpp:1:
C:\Users\esp\Documents\Arduino\libraries\Watchy\src\Watchy.cpp: In member function 'void Watchy::deepSleep()':
C:\Users\esp\AppData\Local\Arduino15\packages\esp32\hardware\esp323円.3.0\variants\watchy/pins_arduino.h:46:23: error: 'GPIO_SEL_26' was not declared in this scope; did you mean 'GPIO_NUM_26'?
 46 | #define MENU_BTN_MASK GPIO_SEL_26
 | ^~~~~~~~~~~
C:\Users\esp\AppData\Local\Arduino15\packages\esp32\hardware\esp323円.3.0\variants\watchy/pins_arduino.h:50:23: note: in expansion of macro 'MENU_BTN_MASK'
 50 | #define BTN_PIN_MASK MENU_BTN_MASK | BACK_BTN_MASK | UP_BTN_MASK | DOWN_BTN_MASK
 | ^~~~~~~~~~~~~
C:\Users\esp\Documents\Arduino\libraries\Watchy\src\Watchy.cpp:129:7: note: in expansion of macro 'BTN_PIN_MASK'
 129 | BTN_PIN_MASK,
 | ^~~~~~~~~~~~
C:\Users\esp\AppData\Local\Arduino15\packages\esp32\hardware\esp323円.3.0\variants\watchy/pins_arduino.h:47:23: error: 'GPIO_SEL_25' was not declared in this scope; did you mean 'GPIO_NUM_25'?
 47 | #define BACK_BTN_MASK GPIO_SEL_25
 | ^~~~~~~~~~~
C:\Users\esp\AppData\Local\Arduino15\packages\esp32\hardware\esp323円.3.0\variants\watchy/pins_arduino.h:50:39: note: in expansion of macro 'BACK_BTN_MASK'
 50 | #define BTN_PIN_MASK MENU_BTN_MASK | BACK_BTN_MASK | UP_BTN_MASK | DOWN_BTN_MASK
 | ^~~~~~~~~~~~~
C:\Users\esp\Documents\Arduino\libraries\Watchy\src\Watchy.cpp:129:7: note: in expansion of macro 'BTN_PIN_MASK'
 129 | BTN_PIN_MASK,
 | ^~~~~~~~~~~~
C:\Users\esp\AppData\Local\Arduino15\packages\esp32\hardware\esp323円.3.0\variants\watchy/pins_arduino.h:42:21: error: 'GPIO_SEL_35' was not declared in this scope; did you mean 'GPIO_NUM_35'?
 42 | #define UP_BTN_MASK GPIO_SEL_35
 | ^~~~~~~~~~~
C:\Users\esp\AppData\Local\Arduino15\packages\esp32\hardware\esp323円.3.0\variants\watchy/pins_arduino.h:50:55: note: in expansion of macro 'UP_BTN_MASK'
 50 | #define BTN_PIN_MASK MENU_BTN_MASK | BACK_BTN_MASK | UP_BTN_MASK | DOWN_BTN_MASK
 | ^~~~~~~~~~~
C:\Users\esp\Documents\Arduino\libraries\Watchy\src\Watchy.cpp:129:7: note: in expansion of macro 'BTN_PIN_MASK'
 129 | BTN_PIN_MASK,
 | ^~~~~~~~~~~~
C:\Users\esp\AppData\Local\Arduino15\packages\esp32\hardware\esp323円.3.0\variants\watchy/pins_arduino.h:48:23: error: 'GPIO_SEL_4' was not declared in this scope; did you mean 'GPIO_NUM_4'?
 48 | #define DOWN_BTN_MASK GPIO_SEL_4
 | ^~~~~~~~~~
C:\Users\esp\AppData\Local\Arduino15\packages\esp32\hardware\esp323円.3.0\variants\watchy/pins_arduino.h:50:69: note: in expansion of macro 'DOWN_BTN_MASK'
 50 | #define BTN_PIN_MASK MENU_BTN_MASK | BACK_BTN_MASK | UP_BTN_MASK | DOWN_BTN_MASK
 | ^~~~~~~~~~~~~
C:\Users\esp\Documents\Arduino\libraries\Watchy\src\Watchy.cpp:129:7: note: in expansion of macro 'BTN_PIN_MASK'
 129 | BTN_PIN_MASK,
 | ^~~~~~~~~~~~
C:\Users\esp\Documents\Arduino\libraries\Watchy\src\Watchy.cpp: In member function 'virtual void Watchy::handleButtonPress()':
C:\Users\esp\AppData\Local\Arduino15\packages\esp32\hardware\esp323円.3.0\variants\watchy/pins_arduino.h:46:23: error: 'GPIO_SEL_26' was not declared in this scope; did you mean 'GPIO_NUM_26'?
 46 | #define MENU_BTN_MASK GPIO_SEL_26
 | ^~~~~~~~~~~
C:\Users\esp\Documents\Arduino\libraries\Watchy\src\Watchy.cpp:138:19: note: in expansion of macro 'MENU_BTN_MASK'
 138 | if (wakeupBit & MENU_BTN_MASK) {
 | ^~~~~~~~~~~~~
C:\Users\esp\AppData\Local\Arduino15\packages\esp32\hardware\esp323円.3.0\variants\watchy/pins_arduino.h:47:23: error: 'GPIO_SEL_25' was not declared in this scope; did you mean 'GPIO_NUM_25'?
 47 | #define BACK_BTN_MASK GPIO_SEL_25
 | ^~~~~~~~~~~
C:\Users\esp\Documents\Arduino\libraries\Watchy\src\Watchy.cpp:174:24: note: in expansion of macro 'BACK_BTN_MASK'
 174 | else if (wakeupBit & BACK_BTN_MASK) {
 | ^~~~~~~~~~~~~
C:\Users\esp\AppData\Local\Arduino15\packages\esp32\hardware\esp323円.3.0\variants\watchy/pins_arduino.h:42:21: error: 'GPIO_SEL_35' was not declared in this scope; did you mean 'GPIO_NUM_35'?
 42 | #define UP_BTN_MASK GPIO_SEL_35
 | ^~~~~~~~~~~
C:\Users\esp\Documents\Arduino\libraries\Watchy\src\Watchy.cpp:187:24: note: in expansion of macro 'UP_BTN_MASK'
 187 | else if (wakeupBit & UP_BTN_MASK) {
 | ^~~~~~~~~~~
C:\Users\esp\AppData\Local\Arduino15\packages\esp32\hardware\esp323円.3.0\variants\watchy/pins_arduino.h:48:23: error: 'GPIO_SEL_4' was not declared in this scope; did you mean 'GPIO_NUM_4'?
 48 | #define DOWN_BTN_MASK GPIO_SEL_4
 | ^~~~~~~~~~
C:\Users\esp\Documents\Arduino\libraries\Watchy\src\Watchy.cpp:199:24: note: in expansion of macro 'DOWN_BTN_MASK'
 199 | else if (wakeupBit & DOWN_BTN_MASK) {
 | ^~~~~~~~~~~~~

Related links

Closes #11737

Copy link
Contributor

github-actions bot commented Aug 16, 2025
edited
Loading

Messages
📖 🎉 Good Job! All checks are passing!

👋 Hello SuGlider, we appreciate your contribution to this project!


📘 Please review the project's Contributions Guide for key guidelines on code, documentation, testing, and more.

🖊️ Please also make sure you have read and signed the Contributor License Agreement for this project.

Click to see more instructions ...


This automated output is generated by the PR linter DangerJS, which checks if your Pull Request meets the project's requirements and helps you fix potential issues.

DangerJS is triggered with each push event to a Pull Request and modify the contents of this comment.

Please consider the following:
- Danger mainly focuses on the PR structure and formatting and can't understand the meaning behind your code or changes.
- Danger is not a substitute for human code reviews; it's still important to request a code review from your colleagues.
- To manually retry these Danger checks, please navigate to the Actions tab and re-run last Danger workflow.

Review and merge process you can expect ...


We do welcome contributions in the form of bug reports, feature requests and pull requests.

1. An internal issue has been created for the PR, we assign it to the relevant engineer.
2. They review the PR and either approve it or ask you for changes or clarifications.
3. Once the GitHub PR is approved we do the final review, collect approvals from core owners and make sure all the automated tests are passing.
- At this point we may do some adjustments to the proposed change, or extend it by adding tests or documentation.
4. If the change is approved and passes the tests it is merged into the default branch.

Generated by 🚫 dangerJS against b756680

@SuGlider SuGlider moved this from In Progress to In Review in Arduino ESP32 Core Project Roadmap Sep 3, 2025
@SuGlider SuGlider added the Status: Review needed Issue or PR is awaiting review label Sep 3, 2025
@SuGlider SuGlider marked this pull request as ready for review September 3, 2025 17:30
Copilot

This comment was marked as outdated.

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Copy link
Contributor

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR fixes compilation errors in the Watchy device pins configuration by replacing deprecated GPIO_SEL_* constants with BIT64() macro calls. The issue was causing builds to fail when using the Watchy board with Arduino IDE examples.

  • Replaces hardcoded GPIO_SEL_* constants with dynamic BIT64() macro calculations
  • Removes version-specific UP_BTN_MASK definitions and consolidates mask definitions
  • Updates all button and interrupt pin masks to use the corrected format

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

Copy link
Member

@P-R-O-C-H-Y P-R-O-C-H-Y added Status: Pending Merge Pull Request is ready to be merged and removed Status: Review needed Issue or PR is awaiting review labels Sep 4, 2025
@me-no-dev me-no-dev merged commit f9bc177 into master Sep 4, 2025
11 checks passed
@me-no-dev me-no-dev deleted the fix/watchy_pin_mask branch September 4, 2025 12:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Reviewers

Copilot code review Copilot Copilot left review comments

@me-no-dev me-no-dev me-no-dev approved these changes

@lucasssvaz lucasssvaz lucasssvaz approved these changes

@P-R-O-C-H-Y P-R-O-C-H-Y P-R-O-C-H-Y approved these changes

Labels
Status: Pending Merge Pull Request is ready to be merged Type: Bug 🐛 All bugs Type: 3rd party Boards Related to third-party/non-Espressif hardware boards.
Projects
Milestone
3.3.0
Development

Successfully merging this pull request may close these issues.

Issues with variants/watchy/pins_arduino.h

AltStyle によって変換されたページ (->オリジナル) /