Skip to content

Commit f9bc177

Browse files
authored
Merge pull request #11738 from espressif/fix/watchy_pin_mask
fix(pins_arduino): Fixes te mask for the Watchy Device pins
2 parents b5a6f1c + b756680 commit f9bc177

File tree

1 file changed

+9
-11
lines changed

1 file changed

+9
-11
lines changed

variants/watchy/pins_arduino.h

Lines changed: 9 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -29,24 +29,22 @@ static const uint8_t RTC_INT_PIN = 27;
2929
#if defined(ARDUINO_WATCHY_V10)
3030
static const uint8_t UP_BTN_PIN = 32;
3131
static const uint8_t BATT_ADC_PIN = 33;
32-
#define UP_BTN_MASK GPIO_SEL_32
33-
#define RTC_TYPE 1 //DS3231
32+
#define RTC_TYPE 1 //DS3231
3433
#elif defined(ARDUINO_WATCHY_V15)
3534
static const uint8_t UP_BTN_PIN = 32;
3635
static const uint8_t BATT_ADC_PIN = 35;
37-
#define UP_BTN_MASK GPIO_SEL_32
38-
#define RTC_TYPE 2 //PCF8563
36+
#define RTC_TYPE 2 //PCF8563
3937
#elif defined(ARDUINO_WATCHY_V20)
4038
static const uint8_t UP_BTN_PIN = 35;
4139
static const uint8_t BATT_ADC_PIN = 34;
42-
#define UP_BTN_MASK GPIO_SEL_35
43-
#define RTC_TYPE 2 //PCF8563
40+
#define RTC_TYPE 2 //PCF8563
4441
#endif
4542

46-
#define MENU_BTN_MASK GPIO_SEL_26
47-
#define BACK_BTN_MASK GPIO_SEL_25
48-
#define DOWN_BTN_MASK GPIO_SEL_4
49-
#define ACC_INT_MASK GPIO_SEL_14
50-
#define BTN_PIN_MASK MENU_BTN_MASK | BACK_BTN_MASK | UP_BTN_MASK | DOWN_BTN_MASK
43+
#define UP_BTN_MASK (BIT64(UP_BTN_PIN))
44+
#define MENU_BTN_MASK (BIT64(MENU_BTN_PIN))
45+
#define BACK_BTN_MASK (BIT64(BACK_BTN_PIN))
46+
#define DOWN_BTN_MASK (BIT64(DOWN_BTN_PIN))
47+
#define ACC_INT_MASK (BIT64(ACC_INT_1_PIN))
48+
#define BTN_PIN_MASK (MENU_BTN_MASK | BACK_BTN_MASK | UP_BTN_MASK | DOWN_BTN_MASK)
5149

5250
#endif /* Pins_Arduino_h */

0 commit comments

Comments
 (0)