From 170029672a2bd4d3a9cbf72d2e640beb94e7d138 Mon Sep 17 00:00:00 2001 From: "Alexandre J. Raymond" Date: Tue, 3 May 2022 21:32:11 -0400 Subject: [PATCH] Fix missing defines breaking compilation --- src/config.h | 42 ++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 42 insertions(+) diff --git a/src/config.h b/src/config.h index 6529486..78b6e4c 100644 --- a/src/config.h +++ b/src/config.h @@ -1,6 +1,48 @@ #ifndef CONFIG_H #define CONFIG_H +//pins +#define MENU_BTN_PIN 26 +#define BACK_BTN_PIN 25 +#define DOWN_BTN_PIN 4 +#define DISPLAY_CS 5 +#define DISPLAY_RES 9 +#define DISPLAY_DC 10 +#define DISPLAY_BUSY 19 +#define ACC_INT_1_PIN 14 +#define ACC_INT_2_PIN 12 +#define VIB_MOTOR_PIN 13 +#define RTC_INT_PIN 27 + + +#if !defined(ARDUINO_WATCHY_V10) && !defined(ARDUINO_WATCHY_V15) && !defined(ARDUINO_WATCHY_V20) + #warning Hardware revision is not defined at the project level. Using hard-coded value + #define ARDUINO_WATCHY_V20 +#endif + +#if defined (ARDUINO_WATCHY_V10) + #define UP_BTN_PIN 32 + #define BATT_ADC_PIN 33 + #define UP_BTN_MASK GPIO_SEL_32 + #define RTC_TYPE 1 //DS3231 +#elif defined (ARDUINO_WATCHY_V15) + #define UP_BTN_PIN 32 + #define BATT_ADC_PIN 35 + #define UP_BTN_MASK GPIO_SEL_32 + #define RTC_TYPE 2 //PCF8563 +#elif defined (ARDUINO_WATCHY_V20) + #define UP_BTN_PIN 35 + #define BATT_ADC_PIN 34 + #define UP_BTN_MASK GPIO_SEL_35 + #define RTC_TYPE 2 //PCF8563 +#endif + +#define MENU_BTN_MASK GPIO_SEL_26 +#define BACK_BTN_MASK GPIO_SEL_25 +#define DOWN_BTN_MASK GPIO_SEL_4 +#define ACC_INT_MASK GPIO_SEL_14 +#define BTN_PIN_MASK MENU_BTN_MASK|BACK_BTN_MASK|UP_BTN_MASK|DOWN_BTN_MASK + //display #define DISPLAY_WIDTH 200 #define DISPLAY_HEIGHT 200