2021-12-30 23:16:03 -05:00
|
|
|
#ifndef CONFIG_H
|
|
|
|
#define CONFIG_H
|
|
|
|
|
2022-05-03 21:32:11 -04:00
|
|
|
//pins
|
2022-10-08 16:22:33 -04:00
|
|
|
#if !defined(ARDUINO_WATCHY_V10) && !defined(ARDUINO_WATCHY_V15) && !defined(ARDUINO_WATCHY_V20)
|
|
|
|
|
|
|
|
#pragma message "Please install the latest ESP32 Arduino Core (2.0.5+) and choose Watchy as the target board"
|
|
|
|
#pragma message "Hardware revision is not defined at the project level, please define in config.h. Defaulting to ARDUINO_WATCHY_V20"
|
|
|
|
|
|
|
|
//Change to your board version
|
|
|
|
#define ARDUINO_WATCHY_V20
|
|
|
|
|
2022-05-03 21:32:11 -04:00
|
|
|
#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)
|
|
|
|
#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
|
|
|
|
|
2022-10-08 16:22:33 -04:00
|
|
|
#endif
|
|
|
|
|
2021-12-30 23:16:03 -05:00
|
|
|
//display
|
|
|
|
#define DISPLAY_WIDTH 200
|
|
|
|
#define DISPLAY_HEIGHT 200
|
2022-04-28 21:17:00 -04:00
|
|
|
// wifi
|
2021-12-30 23:16:03 -05:00
|
|
|
#define WIFI_AP_TIMEOUT 60
|
2022-04-28 21:17:00 -04:00
|
|
|
#define WIFI_AP_SSID "Watchy AP"
|
|
|
|
// menu
|
2021-12-30 23:16:03 -05:00
|
|
|
#define WATCHFACE_STATE -1
|
|
|
|
#define MAIN_MENU_STATE 0
|
2022-04-28 21:17:00 -04:00
|
|
|
#define APP_STATE 1
|
2021-12-30 23:16:03 -05:00
|
|
|
#define FW_UPDATE_STATE 2
|
2022-04-28 21:17:00 -04:00
|
|
|
#define MENU_HEIGHT 25
|
|
|
|
#define MENU_LENGTH 7
|
|
|
|
// set time
|
|
|
|
#define SET_HOUR 0
|
2021-12-30 23:16:03 -05:00
|
|
|
#define SET_MINUTE 1
|
2022-04-28 21:17:00 -04:00
|
|
|
#define SET_YEAR 2
|
|
|
|
#define SET_MONTH 3
|
|
|
|
#define SET_DAY 4
|
2021-12-30 23:16:03 -05:00
|
|
|
#define HOUR_12_24 24
|
2022-04-28 21:17:00 -04:00
|
|
|
// BLE OTA
|
|
|
|
#define BLE_DEVICE_NAME "Watchy BLE OTA"
|
|
|
|
#define WATCHFACE_NAME "Watchy 7 Segment"
|
2021-12-30 23:16:03 -05:00
|
|
|
#define SOFTWARE_VERSION_MAJOR 1
|
|
|
|
#define SOFTWARE_VERSION_MINOR 0
|
|
|
|
#define SOFTWARE_VERSION_PATCH 0
|
|
|
|
#define HARDWARE_VERSION_MAJOR 1
|
|
|
|
#define HARDWARE_VERSION_MINOR 0
|
2022-04-28 21:17:00 -04:00
|
|
|
// Versioning
|
2023-01-12 07:43:09 -05:00
|
|
|
#define WATCHY_LIB_VER "1.4.6"
|
2022-01-15 22:58:58 -05:00
|
|
|
#endif
|